3

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!

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

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.

1

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
}
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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