WordPress.org

Ready to get started?Download WordPress

Forums

How to display primary or secondary menu (1 post)

  1. castil
    Member
    Posted 3 years ago #

    Hi everyone,

    I'm using a template I've created with artisteer.
    Like for most of wp templates, I'm able to create a few menus in the appearance section.

    As I want my website to be bilingual, I've created a Primary Menu in french and a Secondary Menu in english.
    Now I want them to appear on relevant pages with this code in the php files:

    <?php if( !preg_match( '/^\/en(\/|$)/', $_SERVER['REQUEST_URI'] ) ) { ?>
    Primary Menu
    <?php } else { ?>
    Secondary Menu
    <?php } ?>

    But I don't know what is supposed to replace here 'Primary Menu' and 'Secondary Menu'

    For now, my current menu (Primary Menu) is displayed with this code:

    <?php echo $menu_items; ?>

    If anyone can help me, please let me know if you need further details

    I really appreciate your help

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic