WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu.

I don't want this to happen. I want to do something like:

if user has not set a menu for footer
   display a message telling them they should.
   display said menu.

How would I do this?

share|improve this question

check in footer if their any menu for their location

    if ( has_nav_menu( $location ) ) {
         //add your footer menu or do something
      //display a message telling them they should

Important Link:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.