Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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">
        jQuery(document).ready(function($) 
        {    
            $('.menu-top').each(function()
            {
                old_value = $(this).html();
                $(this).html( '<div>' + old_value + '</div>' );
            });
        });
    </script>
    <?php
}
share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.