AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Custom URL In Navigation

3 Posts
2 Users
0 Reactions
1,258 Views
uforeport
Posts: 13
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@uforeport)
Eminent Member
Joined: 7 years ago
[#9146]

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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@uforeport)
Eminent Member
Joined: 7 years ago

Thank you very much


Share: