WordPress.org

Support

Support » Themes and Templates » how to use a different menu on a specific page

how to use a different menu on a specific page

  • I’m building my own child theme on a blank framework and am calling a main navigation menu in header.php. I need this menu on all of my pages except the main landing page. For my main landing page, I want to use an alternate navigation menu than what is on all the other pages. The main landing page will just be static HTML – no feeds or recent posts.

    How can I do this?

    While I’m at it, is there a way to disable the main footer.php just on the home page too?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You could use conditional tags:
    http://codex.wordpress.org/Conditional_Tags

    Basically, you’d write a little php function in your theme so if it is home, it displays your alternate menu, but if it is another page than show the other one. You’d do the same thing for your footer file too, though you’ll have to be careful with the footer – you need to make sure you still have your closing php and body tags depending on the theme – you can’t just get rid of the footer file entirely!

    Thanks! Worked great!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to use a different menu on a specific page’ is closed to new replies.
Skip to toolbar