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?
Leave a Reply
You must be logged in to post a comment.
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?
You must be logged in to post a comment.
The easiest way to accomplish this would be to filter
wp_nav_menu_items
or more preciselywp_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. 🙂