BuddyDev

Search

[Resolved] BuddyPress User Profile Tabs Creator Pro – Modifying Profile Menu Items

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #21691

    Hello,

    I am trying to selectively remove nav items from the profile menu. I discovered that this is controlled by the Adminbar (kinda weird), and I was able to remove the “settings” nav item by following the instructions here: https://buddydev.com/docs/buddypress-user-profile-tabs-creator-pro/modify-visibility-availability-existing-buddypress-profile-tab/

    But one thing that was not explained in the document was the need to also input a value for the “Adminbar Item ID” field. Thanks to another post on this forum I found that the Adminbar Item ID for “settings” is “my-account-settings”.

    How do I determine what the rest of the “Adminbar Item ID’s” are? For example I might want to remove some of the built-in ones like Messages, Friends and Groups… but I also want to tweak ones that are added by other plugins like Forums, Docs and Photos.

    Is there a list of Adminbar Item ID’s somewhere?

    Thank you for the help!

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #21698

    If I look at the source code for the links it looks like they all follow the same pattern of:
    id=wp-admin-bar-my-account- ***** -default

    So apparently the Adminbar ID is the part at the end like:
    my-account-forums

    Is this correct? It seems to work so far for the ones I have tried. Is there a more reliable way of determining the Adminbar ID?

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #21706

    I’m trying to remove the subnav for the plugin buddypress-docs (https://wordpress.org/plugins/buddypress-docs/), but something weird is happening.

    When I modify the user tab it works pretty much as expected except for one thing, the link on the adminbar profile menu does not change. I set the “Tab Link” to a static URL, but the link on the menu does not change.

    Another thing that is happening is when I try to adjust the Group Tab, if I check the box next to “Are we modifying predefined tab?” then the subnav section disappears! There is no button to create a new subnav, just an HTML link to the help documentation.

    I think it might be because the profile tab section and the group tab section both have the same slug (docs) I think?

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #21742

    Hi Mic,
    I am sorry, I have been travelling to another place for last few days and could not assist earlier. Will be able to assist better from 30th March.

    For now:-

    1. You are correct about admin bar. I will add documentation for it.

    2. Static Link in adminbar:- Please allow me to check it today and update you by the day end.

    3. Group Tab:- This is supposed to work like that. Group sub tabs are not nav items(BuddyPress does register them as sub nav items). We don’t have any known way to understand if a group tab has existing sub tabs and what they could be.
    That’s why we have disabled this for now. In future, It might be possible to add to new sub tabs to existing group tabs but it won’t be feasible to remove th existing sub nav items of a group tab.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #22013

    Thank you.

    I think I might have a misunderstanding about the adminbar account menu. I am able to remove items from this menu, but is it not possible to: rename, adjust position, change link or add new items?

    I want the adminbar account menu to match the changes that I make with Profile Tabs Creator. If it’s not possible with your tool, do you know of another way to accomplish this?

    I have created a screenshot that highlights the differences between the two menus that I am trying to adjust:
    https://imgur.com/a/iKdM7OC

    I appreciate your help!

    -Mic

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #22029

    Hi Mic,
    Thank you.
    I am sorry but matching the order of nav items in adminbar and profile tabs is not feasible currently.

    1. WordPress does not support positioned admin bar items. It dimply adds first added item as the first entry.

    BuddyPress does emulate the positioned nav items fro admin bar menu but it is limited. If we add/remove using WordPress API, we can’t control the order). We can’t use BuddyPress’s emulated API as it has various limitations.

    In other words, It is not feasible currently to match the order in adminbar and profile sub tabs/tabs. You can do that with custom code(by modifying priority of the code that adds admin bar item or removing and reattaching admin bar nodes).

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #22036

    Ah, I see.

    So positioning is clearly out. What about the other items: renaming, changing the link or adding new menu items to the adminbar?

    Am I correct in assuming that these are not possible with Profile Tabs Creator (my misunderstanding)? I am trying to better understand the limits and capabilities of what can be done.

    It should be possible to change the labels of the menu items using a language file though, correct?

    -Mic

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #22062

    Hi Mic,
    My apologies for the inconvenience.

    Limitations:- You can not reorder menu items in the adminbar without code currently. That is a limitation I won’t be able to fix in the right way unless WordPress adds support for positioned adminbar nav items.

    I did test other things:-
    1. You can add admin bar menu item correctly with current plugin. Please make sure you have enable add to admin bar option and have provided admin bar item id.

    2. For changing label/link of existing tabs in adminbar:- This is not available in current version but it is easily doable. I will post an updat on Monday or latest by Tuesday with it.

    I can gladly post a video to assist you adding menu to the adminbar if needed.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 41
    Mic on #22068

    Thank you for clarifying all of that!

    I missed the option “Add to admin bar?” that only displays when adding new items. Thank you for pointing that out. Just knowing it was possible helped me double check those settings. No need for a video 🙂

    I have a question about the option “Content” at the bottom when adding a new menu item. I read the documentation that says:

    “You can use any text/html in the content. You can also use shortcodes. By using shortcode you can easily integrate any plugin with BuddyPress(If that is your intention).”

    But I still don’t understand how this feature is used. Where does it display? How do people use this content field? How would it help me integrate other plugins with BuddyPress?

    The ability to change the labels will be awesome!! I will leave this thread set to “not resolved” until after I test that new feature when it is available.

    Thanks for all of your hard work!

    -Mic

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #22070

    Hi Mic,
    Thank you.

    I am glad you found that option 🙂

    The Content is the actual content shown on the tab page. It is used in case you add a new Tab or add a new sub tab. When you visit that sub tab, the content is shown.

    If a plugin allows passing user id in the shortcode, you can use their shortcode to show displayed user specific content on the profile tab.

    Hope that clarifies.

    Regards
    Brajesh

The topic ‘ [Resolved] BuddyPress User Profile Tabs Creator Pro – Modifying Profile Menu Items’ is closed to new replies.

This topic is: resolved