latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Change a menu link once logged in

Home Forums Community Forum Change a menu link once logged in

This topic contains 3 replies, has 3 voices. Last updated by  Bruce 4 years, 1 month ago.

Topic Author Topic
Posted: Friday Nov 30th, 2012 at 9:42 am #33008

Hi, I have downloaded and tested the free version of your great plugin :)

Is it possible to have a menu link change once a user has logged in – Essentially I want the menu link to redirect to a specific page based on the username the same way the user is redirected once they login using the %%current_user_login%% replacement code for the login welcome page.

I know how to use conditional statements to read in different menus based on whether a user is logged in or not, I just don’t know how to make the logged in version menu link dynamic like your replacement code is for the login form button.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Nov 30th, 2012 at 4:34 pm #33043
Raam Dev
Username: Raam
Staff Member

Hi Ben,

If you want to make a menu link that dynamically changes based on the user’s login, you’ll need to edit your theme’s header.php file (or wherever the menu is generated) and then add in the necessary PHP code to make that menu dynamic. Instead of the replacement codes, you can use the s2Member PHP Constants in your PHP code: Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants.

Posted: Monday Dec 3rd, 2012 at 5:23 am #33282

Hi Raam,

Thank you so much for pointing me in the right direction, it worked a treat.

What an amazing plugin you guys have developed :)

Posted: Monday Dec 3rd, 2012 at 1:56 pm #33333
Bruce
Username: Bruce
Staff Member

Hi Ben,

Thanks for the kudos! Happy to hear that Raam helped you.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.