Skip to:
Content
Pages
Categories
Search
Top
Bottom

Shortcuts for top menu?


  • voopress
    Participant

    @voopress

    I need to disable the top bar on a multisite setup which has BP on it. When I do, shortcuts/links are gone so I need a list of items to link to.

    For example, for a user to get to their home page/profile, they need to know to click on their own avatar on the right hand side. How can I simply create a menu item for this, what would the link be?

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

  • @mercime
    Keymaster

    @mercime

    Add to your theme’s functions.php file http://pastebin.com/HSpJNLyV


    voopress
    Participant

    @voopress

    Wonderful, that works perfectly. Just one thing, I’m using the IfMenu, a conditional menu. How can I hide this menu item for users who are logged in only as it does not show up in the menus under Appearance.


    voopress
    Participant

    @voopress

    Here is a better question. Can this code be added where I can create a menu in the Appearance section of the GUI instead of hacking the php file?


    @mercime
    Keymaster

    @mercime

    How can I hide this menu item for users who are logged in only as it does not show up in the menus under Appearance.

    @voopress The code above shows the link only for logged in users. The link won’t show up if they’re not logged in. Why would you want to “hide this menu item for users who are logged in only”?

    instead of hacking the php file

    There’s no hacking being done here 🙂 You’re legitimately adding a filter to include the dynamic link to the menu. You can change the markup in the code posted just so those additional class/es would match those of the IfMenu’s. I’m not aware of any menu plugin which allows you to add a dynamic link.


    voopress
    Participant

    @voopress

    >Why would you want to “hide this menu item for users who are logged in only”?

    Simply because it doesn’t apply to non logged in users so might be confusing. I tend to hide menus which guests don’t need to keep things less confusing.

    >There’s no hacking being done here

    Well, it works perfectly so I guess I just need to keep a note to add this to the theme if it gets updated.

    While we’re at this and you seem to know a lot about the menus, is there a list of other variables which can be used in this way?

    Also, when a blog owner is in the Dashboard, they can see other blog owners sites/dashboard. Even though they can’t log into them, it’s confusing. I’d like to change that My Sites to one single link back to the main site. Is there a way of doing that?


    voopress
    Participant

    @voopress

    Sorry, I meant that I do only want to show it to logged in users and for the stated reason.

    BTW, is there a way to change menu positions in the code you supplied? It works perfectly but it is in the wrong position in the menu of our particular site.


    @mercime
    Keymaster

    @mercime

    Something got lost in translation. To reiterate, the code to the dynamic link in the menu will only show up when user is logged in, so we’re on the same page 🙂

    It works perfectly but it is in the wrong position in the menu of our particular site.

    How is it in the wrong position?


    voopress
    Participant

    @voopress

    Right, only logged in users see it which is what we want.

    Wrong position simply meaning esthetically, it would be better if I could place it in another menu position.

    So, let’s say I called the new menu ‘NewMenu’. I have other menu items, say,

    MenuItem1 MenuItem2 MenuItem3 NewMenu

    I need to have NewMenu in position two for example so that the new menu looks like;

    MenuItem1 NewMenu MenuItem2 MenuItem3

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Shortcuts for top menu?’ is closed to new replies.
Skip to toolbar