How can I add items to the menu via the PHP file?

I run a membership site and I want to add a tab to the navigation menu that says, “My Subscriptions” and then add certain pages to that tab, which will be specific for each member depending whether or not they have access to the content.

Right now I just have 20 different menus and 20 different if statements in the PHP file and it is not very efficient, not to mention the amount of menus I have to create tenfold if I want to add more content.

Read More

Basically, I need some piece of code in the menu PHP file that says :

if member_is_logged_in('1') {
    add content 1 to "My Subscriptions
} elseif member_is_logged_in('2') {
    add content 2 to "My Subscriptions

Can anyone help me out with this? Thanks!

Related posts

Leave a Reply

1 comment