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

[Resolved] Replace "Profile" with "My Account" in mini login

Simple Membership Plugin › Forums › Simple Membership Plugin › Replace "Profile" with "My Account" in mini login

Tagged: mini login

  • This topic has 13 replies, 5 voices, and was last updated 6 years, 1 month ago by quick_dry.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • April 28, 2019 at 7:01 pm #18025
    Seb
    Participant

    How can I change “Profile” to “My account” and link it to custom page please?

    April 29, 2019 at 2:28 am #18032
    mbrsolution
    Moderator

    Hi, can you provide more information.

    Thank you

    April 29, 2019 at 4:16 pm #18038
    Seb
    Participant

    So after a member logins, mini login bar has two options available: profile and logout. I would like to remove “profile” and replace it with My Account words and link it to “my account” custom page.

    Or if you can just tell me in which file I can access php code for the shortcode of mini login bar so I can try change it.

    Thanks you.

    April 30, 2019 at 5:52 am #18044
    mbrsolution
    Moderator

    Hi, please check the following documentation. Let me know if this helps you.

    Thank you

    April 30, 2019 at 9:50 am #18050
    Seb
    Participant

    Mini login widget has shortcode: [swpm_mini_login]

    (first heading in this article)

    I want to modify it. Can You tell me where I can find the code? In which file? I want to remove “Profile” and replace it with “My Account”.

    April 30, 2019 at 9:58 pm #18057
    mbrsolution
    Moderator

    Hi, here is the file you need to check. Please be careful making changes to the core file. They could break the plugins functionality. Also remember that every time you update the plugin your custom code will be lost. It would be a good idea to save a copy of the file locally.

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

    Kind regards

    May 1, 2019 at 5:21 pm #18074
    Seb
    Participant

    Thank you. This is exactly was I was looking for. Now I am not sure if I can ask my next question here. I do not know how to link url to the last piece of code where it says “(profile-page-url)”

    $account_page_url = SwpmSettings::get_instance()->get_value(‘profile-page-url’);

    So maybe you could tell me how to change this value so user will be taken to other page instead of profile page.

    Thank you in advance.

    May 1, 2019 at 11:58 pm #18086
    mbrsolution
    Moderator

    Hi, I am not a developer myself. Your changes require a customized modification to the plugin’s code. Please remember, if you change the base code, you must ensure that whenever the plugin is updated by WordPress; that you remember to “redo” your modifications.

    SWPM is “Open Source” code. If you are a proficient PHP programmer which I think you are, you are welcome to make your own modifications. Alternatively, you can complete a Paid Support request and an SWPM developer will work with you directly.

    Kind regards

    January 10, 2020 at 6:16 am #19589
    Mickael
    Participant

    Hi is there a way to put an edited copy of this page in my theme ?

    something like wp-content/themes/<your-theme>/simple-membership/class.swpm-shortcodes-handler.php

    thanks

    January 10, 2020 at 7:09 am #19591
    mbrsolution
    Moderator

    Hi, are you talking about adding a copy of your customized php files in your child theme?

    January 11, 2020 at 11:38 am #19597
    Mickael
    Participant

    Exactly, I have tested directly in wp-content/themes/<your-theme>/simple-membership/class.swpm-shortcodes-handler.php, but doesen’t work ?

    January 11, 2020 at 11:07 pm #19598
    mbrsolution
    Moderator

    Hi,

    Thank you for replying back.

    Hi is there a way to put an edited copy of this page in my theme ?

    I still don’t understand what you mean by the question above? Can you please provide more information.

    Thank you

    January 12, 2020 at 3:59 pm #19604
    The Assurer
    Moderator

    @Mackael:
    Hi is there a way to put an edited copy of this page in my theme? something like
    wp-content/themes/<your-theme>/simple-membership/class.swpm-shortcodes-handler.php

    @Mbrsolution:
    Hi, are you talking about adding a copy of your customized php files in your child theme?

    @Mackael:
    Exactly…

    You can’t easily “crossbreed” PHP classes from plugins, with themes; because the sequence in which the files are loaded may vary. Your support request is outside the scope of the free support forum; and requires a custom coding job, via our Paid Support service.

    March 3, 2020 at 4:46 pm #19864
    quick_dry
    Participant

    @Mickael instead of messing with your theme, you could put it in a plugin specific to your site – just follow a “build a simple plugin” and put something like this in it – you can see how it checks and modifies the swpm_login_form shortcode’s output. Just call it with the ‘mod_swpm_login_form’ shortcode instead of swpm_login_form.

    //Replace the [swpm_login_form] shortcode output with something else
    //e.g. remove the username from the form output when logged in
    function shortcode_mod_swpm_login_form(){

    $output=do_shortcode(‘[swpm_login_form]’);
    if (strpos($output,’Logged in as’)>-1){ //if user is logged in
    $output=str_replace(‘>Logged in as</div>’,’>Logged in</div>’,$output);
    $output=preg_replace(‘/\<div class=\”swpm-logged-username-value swpm-logged-value\”\>(\S+)\<\/div\>/U’, ”, $output);
    }
    return $output;
    }
    add_shortcode(‘mod_swpm_login_form’, ‘shortcode_mod_swpm_login_form’);`

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 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