Changing Menus in WP Theme

Discussion in 'HTML & Website Design' started by netgo, Jul 15, 2009.

  1. #1
    How can I have changing menus in WP? I mean that different pages will display different side menus that I can define.

    Are there any WP templates that can do it?

    Thanks
     
    netgo, Jul 15, 2009 IP
  2. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #2
    Hmmm... probably best if you look at the WP codex yourself... but you're probably after something like this in your sidebar.php:
    
    <?
    if (is_page('PAGE ONE'))
    {
    MENU CODE FOR PAGE ONE GOES HERE
    }
     
    if (is_page('PAGE TWO'))
    {
    MENU CODE FOR PAGE TWO GOES HERE
    }
    ?>
    PHP:

    http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

    ---

    Why do you want to display different menus for different pages? Give us a bit more info - there might be a nice WP shortcut for what you want to do :)
     
    Kerosene, Jul 15, 2009 IP
  3. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #3
    Thank you!

    I want to have a site that in its main page the user can choose between US/AUS/UK... and than have all the other pages with the same menu but pointin to different pages.

    For example, both US and AUS will have in their side bar a menu with the option RESTAURANTS but clicking on us/restuarants will bring up a different page than aus/restauants.. I hope this is clear.
     
    netgo, Jul 15, 2009 IP
  4. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #4
    Also, how do I write a menu code for the script? or can I get it from one of the default PHP files?
     
    netgo, Jul 15, 2009 IP
  5. netgo

    netgo Active Member

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #5
    Is there anyone who can help? any advice will be highly appreciated.
     
    netgo, Jul 16, 2009 IP