WP-Members: Membership Framework
[resolved] Members area link in menu (9 posts)

  1. l00nix
    Posted 3 years ago #


    I installed and got wp-members to work the way I want on http://free.cloudvas.net (back engine not fully working yet but the wordpress front seems to be working just fine).

    When a user logs in I would like to display a link to the members area so the users can change their info/password if they like.

    I would like to display the link to the members are below the "You are logged in as xyz".

    I have created the members are site already by adding [wp-members page="members-area"] to the content area of one of my pages.

    Any ideas how I could accomplish this?

    Thanks a bunch



  2. jcimb
    Posted 3 years ago #

    I would like to do this also on my site.

  3. 1-jah
    Posted 3 years ago #

    Hey there. I'm not sure if we're on the same page, but if we are, you would want to add this line of code on or about line 151 in the wp-members-sidebar.php file where it says global $user_login.

    $page = $url . '/my-profile';

    just a couple lines down I put this code right under where it displays the current layout for logging out.

    <link html here="' . $logout . '">' . __( 'Logout', 'wp-members' ) . ' | <link html here="' . $page . '">' . __( 'Profile', 'members-area' ) . '</p>';

    where it says "<link html here=" replace that with "<a href="

    Hope this helps.

    - Tony

  4. 1-jah
    Posted 3 years ago #

    p.s. on the first code i gave, the '/my-profile' that should be the path/page your members area is located so they can change their passwords etc.

  5. jcimb
    Posted 3 years ago #

    Thank you 1-jah. That worked, with a little tweaking.
    For me (maybe I have a newer version), it was around line 300.
    My new lines look like:
    $page = $url . '/user-profile';
    <a href="' . $logout . '">' . __( 'Logout', 'wp-members' ) . '</a> | ' . '<a href="' . $page . '">' . __( 'Profile', 'user-profile' ) . '</a></p>';

    I also figured out a way to do this with a text widget and CSS styling, so no changes to code needed.
    I added a text widget after the wp-members widget and put this in the text widget:

    [wp-members status="in"]
    <a href="http://mysite.com/user-profile/">Edit my profile</a>

    Then I styled it to remove the bottom margin and padding of the wp-members widget and reduce the top padding of the text widget. Now the 2 widgets are joined together and appear to be one.
    When not logged in to the site, the 'Edit my profile' of course does not show, but you do see a little extra white space from the empty text widget.

  6. 1-jah
    Posted 3 years ago #

    Hmmmm....mind pasting your wp-member-sidebar.php file here so I can see? Your site is not very mobile friendly and I'm on my iPad right now. And I suggest removing your text widget.

  7. jcimb
    Posted 3 years ago #

    Here's the site that I'm working on: Site
    You won't be able to see how it looks after the user has logged in, so here is a screen shot.

    It works well.

  8. Chad Butler
    Plugin Author

    Posted 3 years ago #

    Tony - it would be better to make a customization like that using a filter function. In this case, I think wpmem_sidebar_status would what you would want to use (see: http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_sidebar_status/). You should never change the plugin's code directly as your changes are going to be overwritten if you upgrade. And if you don't upgrade you are going to miss out on not only new features, but also potential security updates.

  9. jbmaca
    Posted 2 years ago #

    Brilliant solution with the text widget jcimb! Worked like a charm. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic