WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I wish to implement the wordpress 3 menus API in a client site, but the designs has restraint on the width of the top level menu items. How can I be sure the client won't exceed that limit?

share|improve this question
up vote 2 down vote accepted

The easiest way to accomplish this would be to filter wp_nav_menu_items or more precisely wp_nav_menu_{$menu->slug}_items and cut extra items from output.

It would probably me more pretty and proper to limit/warn user in admin area, but at moment I have no remote idea where to start with that. I should learn up on admin side some time. :)

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.