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

I need to do this to enable advanced styling options via css, the one a class the headers are wrapped in isn't adequate to do the type of styling needed. Thanks!

share|improve this question
admin menus = backend menus for posts, settings, etc. There isn't anything like that in themes – ana Jun 12 '11 at 18:16

Since the admin back-end menus do have li tags you can use that if you want. but as far as adding divs you will need to hack the core files directly. That is if you are talking about the back-end.

share|improve this answer

Short of removing everything and recreating it all, I think the only solution is jQuery.

add_action( 'admin_head', 'wrap_menu_div_wpse_19814' );
function wrap_menu_div_wpse_19814()
    <script type="text/javascript">
                old_value = $(this).html();
                $(this).html( '<div>' + old_value + '</div>' );
share|improve this answer

dont know of anything like this but what you can often do sometimes is to target this specificity of a particular div, for instance if you have a div which is included in a < p > which is included in a < table > < tr > and < td > but the div has no class or id then you can still target it by using

table tr td p div{ }

and it will often affect that and only that div .... it's not foolproof but it works a lot of the time .... you often need to use !important though and sometimes you need to go back very far along the page even back as far as the html and body sometimes sometimes pseudo like firstchild help too

hope this helps

good luck

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.