• Hello,

    Thanks for your amazing work !

    I’m creating a website with 2 major sections:
    – 1/public
    – 2/business

    I would like to have:
    mydomain.com as the public side of my website with:
    Landing page A
    1 specific navbar (Menu navbar A – B – C)
    1 specific footer (Menu footer A – B – C)
    including pages like mydomain.com/x (same menu ABC)

    mydomain.com/business as the business side of my website with:
    Landing page B
    1 specific navbar (Menu navbar D – E – F)
    1 specific footer (Menu footer D – E – F)
    including pages like mydomain.com/business/x (same menu DEF)

    Can you help me to make it ? What is the best function that I could use ?

    Thanks a lot !

    Julien.

    PS: I didn’t find any documentation including all the functions supported by your plugin. Can I find that somewhere ? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author shazdeh

    (@shazdeh)

    Hi!

    You can use any function, from WP itself, or added by your theme or plugins. Mostly though, you need these: https://codex.wordpress.org/Conditional_Tags. So for example if you want a menu item to show up only for particular user role, you can use:

    
    in_array('administrator', $GLOBALS['current_user']->roles)
    

    For controlling access to the pages however you need another plugin, I’d recommend: https://wordpress.org/plugins/members/.

    Hello,

    Thanks. I’m gonna try to apply these advices. I don’t need to show up menus for particular user role. I just want to separate the menu for public / pro visitors.

    Is there a function which could search in the URL if there are specific terms ?
    For example, if I want to display a menu only if there is the word “pro” in my URL. Is it possible ?

    Thanks a lot.

    Plugin Author shazdeh

    (@shazdeh)

    There probably is a better way to do this, but you could do:

    
    strpos( $_SERVER['REQUEST_URI'], 'pro' ) !== false
    

    That will check if string “pro” exist in the current URL.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 menus’ is closed to new replies.