Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] Customize the design and content of the Mini Login Form

Simple Membership Plugin › Forums › Simple Membership Plugin › Customize the design and content of the Mini Login Form

Tagged: Mini Login Form Customization

  • This topic has 12 replies, 6 voices, and was last updated 3 years, 10 months ago by Josch.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • August 19, 2022 at 3:40 pm #24276
    Josch
    Participant

    Hi,

    I would like to change the appearance of the [swpm_mini_login].

    It is generated by the class “SwpmShortcodesHandler”

    in the file /wp-content/plugins/simple-membership/classes/shortcode-related/class.swpm-shortcodes-handler.php

    I would like to set buttons for “Login” or “Logout” instead of text links. How can I achieve this? Is it possible in the functions file of my WP child theme?

    For the login/lougout pages/widget this can be done relatively easy: https://simple-membership-plugin.com/?s=loggedin.php but how about the short login?

    Any help is highly appreciated 🙂

    August 24, 2022 at 3:36 pm #24305
    sezg
    Participant

    Upvoting this! I’m here with the same question…

    August 25, 2022 at 4:08 am #24308
    mbrsolution
    Moderator

    Thank you for reaching out to us. I have submitted a message to the developers to investigate further your request.

    Kind regards.

    August 25, 2022 at 7:44 am #24309
    admin
    Keymaster

    There are CSS classes in the HTML output so you can target those to make some appearance related changes (for example: change the color, font, size etc). There is also a filter hook that can be used to override the code completely and customize it from a custom plugin for example.

    If you tell me what and where you need CSS classes or if you need an additional hook, I can look into adding that.

    Customization is subjective since different users will want different looks. So sometimes you may need a developer to customize it according to how you want it to look like on you particular site.

    August 25, 2022 at 11:30 am #24311
    karrenn16
    Participant

    interesting information

    August 26, 2022 at 3:54 pm #24323
    sezg
    Participant

    Thanks for the info. I can handle most of my changes through CSS. However, the client wants to change “Logged in as:” to “Hi,” Can you advise how I can do this?
    Thanks.

    August 26, 2022 at 4:19 pm #24324
    Josch
    Participant

    Hi,

    i would need a hook to overwrite the public function swpm_show_mini_login_sc from

    /simple-membership/classes/shortcode-related/class.swpm-shortcodes-handler.php

    so that I can delete some of the “output” lines and change on of these lines.

    I only need a button “Login” in the head of my site. That should be changed to “Logout”
    when the user is logged in. I nearly realised that with a handful of css:

    
    .swpm_mini_login_no_membership,
    .swpm_mini_login_join_now,
    .swpm_mini_login_label,
    .swpm_mini_login_username,
    .swpm_mini_login_profile {
    display: none;
    }
    

    But then the “|” from the line

    
    $output  .= '<span class="swpm_mini_login_logout"> | <a href="' . $logout_url . '">' . SwpmUtils::_( 'Logout' ) . '</a></span>';
    

    still persists.

    Would it be possible that I can overwrite that in my themes functions.php file
    with an add_filter function?

    Thanks a lot in advance 🙂

    August 27, 2022 at 3:01 pm #24326
    sezg
    Participant

    Hey Josch,
    If it helps, before I used the mini-login shortcode, I had this in my functions.php and it worked well:

    
    //login vs logout written by sez
    // *********************************************************
    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
        if ( SwpmMemberUtils::is_member_logged_in()  && $args->theme_location == 'primary') {
            $items .= '<li><a href="'. site_url('?swpm-logout=true') .'">Logout</a></li>';
        }
        elseif ($args->theme_location == 'primary') {
            $items .= '<li><a href="'. site_url('membership-login/') .'">Login</a></li>';
        }
        return $items;
    }
    

    Now that my client wants to display the username, I thought the mini-login would work better, but I still need to change “Logged in as” to “Hi.” Can anyone advise?
    Thanks,
    Sez

    August 27, 2022 at 10:12 pm #24328
    mbrsolution
    Moderator

    Hi Sez, try the following documentation. Let me know if this helps you.

    https://mbrsolution.com/wordpress/edit-simple-membership-default-english-strings.php

    Kind regards.

    August 28, 2022 at 3:49 pm #24330
    sezg
    Participant

    That’s a clever solution! That worked for me just fine. Combined with the CSS I was able to customize this quite well. Thank you!
    Sez

    August 29, 2022 at 4:19 pm #24339
    Josch
    Participant

    Hi sezg,

    thanks for sharing your solution.

    But I have the mini widget positioned in the page header via a build in function of my theme “The7”. So I would need a hook from that theme to place that add_filter in this “micro widget” as they call their functionality and I haven’t found any hook for this. So a simple membership plugin hook would be easier for me. It seems as I have to wait for an answer of the developers.

    September 27, 2022 at 1:14 pm #24520
    Ryan
    Participant

    Hi,


    @Josch
    have you found a way of sorting it?

    Thanks

    October 4, 2022 at 12:10 pm #24560
    Josch
    Participant

    Hi Ryan,

    not really, I’m still waiting for an answer from the user mbrsolution. On August, 25th he wrote

    “I have submitted a message to the developers to investigate further your request.”


    @mbrsolution
    : What about my question/request. Anything informational from the developers?

    Best wishes

    Josch

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy