Notifications
Clear all

wpForo 1.x.x [Solved] Custom URL In Navigation

3 Posts
2 Users
0 Likes
739 Views
uforeport
Posts: 13
Topic starter
(@uforeport)
Eminent Member
Joined: 5 years ago

Hi all,

I've had to hard code a custom URL into my forum navigation.

I've actually edited the forum .php template and not used the menu function as my website uses a custom login/signup process and a popup box.

As such, I've entered the HTML code into the php file in the back end so it has a custom Login/Register URL popup box on the nav bar.

However, I want this URL to vanish when a user is logged in.

Does anyone know what code I can wrap around this link to stop it showing when a user is logged in?

Any help/advice would be greatly appreciated.

TIA

2 Replies
Sofy
Posts: 4233
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi @uforeport,

I'd suggest you remove the customization you've done and use the solution explained in this support topic:

https://wpforo.com/community/how-to-and-troubleshooting/where-can-i-find-and-edit-the-file-with-login-register-links-on-the-js-popup/#post-28162

Pay attention to this part. 

 If you remove the #wpf-msg-box selector from the code above, it'll replace all login links (wpForo). 

Another option if you want to use your codes you can add extra codes using is_user_logged_in() Wordpress function to hide the menu item for logged-in users.

More info here:

https://developer.wordpress.org/reference/functions/is_user_logged_in/

uforeport
Posts: 13
Topic starter
(@uforeport)
Eminent Member
Joined: 5 years ago

Thank you very much