Opening a link in new tab needs the target attribute to be added on the link. The tab links(main tab) are managed by BuddyPress and we can not add the target attribute.
The only way to do it will be to use js to modify the links.
For sub navs in group, we create the links, so we can provide a way to do it.
Please let me know if you want to go with js and I will assist. It will need modification in your theme’s js.
P.S. I want to open this page, which is not external, in a new window : https://autistance.org/groups/org-aut_allianceautiste-org_orgintl_onu-cdph/allianceautiste-org_orgintl_onu-cdph_audio-video/
This is only an example and there will be more in the future.
P.S.2 I installed the version 2 of that plugin (WP New Window) and added the CSS classes of the button (BBB) but no way, it never wants to open in a new tab. And could not find how to open a specific link (not the button) in a new tab in this plugin.
Anyway it would be nice if there was a checkbox “open in a new window” in your plugin, like it is in the regular WP menus and even in menu plugins (like MegaMax).
In order to let browser open links in new tab automatically, we need to set the ‘target’ attribute. The problem is we do not have control over that. We register our items and BuddyPress generates the links.
That’s why we can not add the open in new tab.
I or @ravisharma will share some code to open tabs in new window in next 2 days.
You must be logged in to reply to this topic.