Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to make default menu bar in one row only, not multiple rows. Please take a look at my development staging site to see what can I do to make the default menu one row.

http://acomplete-staging.balconescom.com/

share|improve this question
1  
Ask pure HTML, CSS or JavaScript questions on Stack Overflow. – toscho Jan 17 at 17:48
Suggest re-opening this question. Two possible solutions (custom callback, custom nav walker) are very much WordPress specific. – Chip Bennett Jan 17 at 17:54
@ChipBennett The menu on the linked page is already just one level deep, so I read that as a question about the final CSS part. – toscho Jan 17 at 18:52
@toscho "one level deep" != "one row". :) Nevertheless, the merit of the question shouldn't depend on rendered output of some unknown code on a third-party site. I think that if the question were to include the relevant wp_nav_menu(), it should be re-opened, since solutions are not limited to CSS only. – Chip Bennett Jan 17 at 18:59
Okay, let’s wait for feedback from the asker. I will not forget it. – toscho Jan 17 at 19:01
show 2 more comments

closed as off topic by Michael, toscho Jan 17 at 17:48

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

You can:

  • Reduce the number of Menu Items
  • Change the margin of #access div to a smaller value
  • Reduce the padding of #access a
  • Change the font-size
  • Or make smaller Menu Titles

There is not much more that you can do, as this is just a Styling issue.

share|improve this answer

The default menu - i.e. the menu returned when no Menu is assigned to the appropriate theme_location in the call to wp_nav_menu() - is wp_page_menu().

By default, wp_page_menu() displays all static pages.

Since you presumably control the total number of static pages (e.g. this is to be a publicly distributed Theme), you have 3 options:

  1. Use the fallback_cb parameter in wp_nav_menu() to output wp_list_pages(), which has a number parameter used to limit the number of pages output. (Except, this parameter isn't working properly, and is a known bug.)
  2. Write an entirely custom walker for wp_nav_menu()
  3. Use CSS (e.g. overflow: hidden) to ensure only one row of pages is displayed. (Note: this solution is outside the scope of WPSE.)
share|improve this answer

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