Skip to:
Content
Pages
Categories
Search
Top
Bottom

Need guidance, should be simple stuff

  • Avatar of Baconbits
    Baconbits
    Participant

    @seriousdon

    Forgive me if this stuff has been asked in the past, I am constantly searching and browsing, website almost complete, there are just a few more kinks I need worked out before I go live.

    1. I want to add a separate link up top to direct users to their member page (www.website.com/members/username). How do I set this up so it takes them to THEIR specific member page.

    2. I want users to be taken to their friends activity feed immediately upon login, and when they click the link I’m asking to create in question 1 also be directed to their friends feed.

    3. In users member page, I would like to reorganize and/or remove the options (both in the top “activity, profile, messages, friends, etc” section and the links that appear below the selected tab (i.e. under activity there is “Personal, Mentions, Friends, etc.)

    4. I have removed the site wide activity link (hid it on a restricted page since I can’t figure out how to remove it) and replaced it with the basic WordPress recent posts page. I have a “premium” content section which I have placed membership restrictions to view, but the posts are still appearing in the recent posts page and activity feeds; is there any way to prevent my premium category from appearing in the live feeds?

    I appreciate any help, there will be a few more things I need help with afterwards but these are my primary issues today.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Baconbits
    Baconbits
    Participant

    @seriousdon

    Found a solution to 1:

    `/ Filter wp_nav_menu() to add profile link
    add_filter( ‘wp_nav_menu_items’, ‘my_nav_menu_profile_link’ );
    function my_nav_menu_profile_link($menu) {
    if (!is_user_logged_in())
    return $menu;
    else
    $profilelink = ‘

  • ‘ . __(‘My Profile’) . ‘
  • ‘;
    $menu = $menu . $profilelink;
    return $menu;
    }`

    I have one more question involving it though, is there a way to change this to display the users name instead of the “my profile” I added? Also, the link showed up as the very last item to the right of all my other category/page links defined in the “Primary Menu” I created. I want it to be the very first on the left, how do I do that?

    Thanks!

Avatar of @mercime
@mercime
Keymaster

@mercime

@seriousdon you’d need another forward slash in front of your comment before the code like so http://pastebin.com/HSpJNLyV

In order to place the dynamic profile link at the beginning of the menu change this following line from
`$menu = $menu . $profilelink;`
to
`$menu = $profilelink . $menu;`

Avatar of Baconbits
Baconbits
Participant

@seriousdon

@mercime thank you very much. #1 is solved :)

Avatar of Hugo
Hugo
Moderator

@hnla

If you want username/display_name instead of ‘My Profile’ or whatever:

http://pastebin.com/uM1RgNdR

Avatar of Baconbits
Baconbits
Participant

@seriousdon

@hugo awesome! Thank you very much

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.