I’m building a wordpress theme and within the theme is a dashboard theme. I want to add a logo and some text above the first menu item in the wordpress admin dashboard menu. Without editing any core wordpress files I figured the best way to do this is to insert it using jquery.
Here is my current code – the php adds the jquery code to the head of the admin area:
add_action('admin_head', 'dashboard_menu_logo');
function dashboard_menu_logo() {
echo '<script type="javascript/text">
jQuery(document).ready(function(){
$("#adminmenu").html("<div class="hello">Hello</div>");
});
</script>';
}
I think the issue is that the page is loading this script after it has populated everything (but I might be wrong) – either way it’s not doing anything. Can anyone help with a solution to add html to the admin menu
You can use admin_menu action. Title area supported html tags.