With BuddyPress User Profile Tabs Creator, You can overwrite the default BuddyPress profile tab link if you need.
- You can link BuddyPress Profile tab to any url of the web.
- Or you can create dynamic url that points to another profile tab/sub tab. This option is helpful to move a subtab to main tab.
In order to override the default tab url, you will need to enter the new url while creatin/modifying a profile tab.
Here is a screenshot of the setting. It is completely optional and you should only use it if you want the tab to act as a link(dynamic or absolute).
Example:- Linking BuddyPress User profile tab to a link on web:-
While creating or modifying a tab, you will see a box for entering link url as shown earlier. All we need to do is use the absolute url in this box. Here are the screenshots showing how to link to google.
This is optional and if you don’t want to link to any special pages, you may avoid this.
Settings:-
Result:-
Example:- Dynamic linking to another sub tab of user profile:-
There are times when you may want to link a tab to some other profile sub tab. This needs dynamic part of url for user.
The profile tabs plugin comes packed with multiple tags to assist you with it.
In this example, we will add a Change Photo profile tab that links to the change avatar sub tab of profile.
Here is my settings.
As specified, The tab is only visible to the profile owner and site admin(see the visibility box). You can control the visibility and link to anything you want.
Here is the result:-
List of available dynamic url tags:-
- [displayed-user-profile] – Dynamic url for the displayed BuddyPress user. For example, it will be like http://example.com/members/sbrajesh/. You will be using this most of the time.
- [displayed-username] – Dynamic token for the displayed BuddyPress user’s username. For example, if you are visiting a user at http://example.com/members/jim/ and you have used a url like http://example.com/page-[displayed-username], It will be linked to http://example.com/page-jim.
- [displayed-user-id] :- Dynamic token for displayed BuddyPress user’s user id. It is the numeric id. The application is similar to the [displayed-username] as explained above.
- [logged-user-profile] – Dynamic url for currently logged in user. I am not sure why would you need it.
- [site-url] – Dynamic link to your sites home page. In case of multisite, it points to the main site home page.
- [blog-url] – Dynamic url to current blog. In case of normal WordPress site, [site-url] and [blog-url] are same. It occupies special meaning when used on multisite.
Example:- If you want to link to http://example.com/members/{dynamic_user_slug}/friends/requests/, you will use [displayed-user-profile]friends/requests/
Go ahead and explore the possibilities.
Complete demo for how to configure tab link in BuddyPress User Profile Tab