[Resolved] Add a div to the admin bar
Hey guys, I searched the forums and could not find an exact answer that I was looking for. I have a customized admin theme that adds an addition image below the admin bar using jQuery. To visualize it, basically it is adding a shadow between the admin-bar and admin-menu so it looks like the menu is nestled underneath the header even when scrolling down. Now I do this using this code in my custom.js file:
//Add shadow to admin bar jQuery('<img src="../wp-content/plugins/retina-press/images/admin-shadow.png" alt="" class="admin-shadow"/></div>').appendTo('#wpadminbar');
The thing is since this is jQuery, it doesn’t load as fast or smooth as I would like. I would really like to do this using a php function, but was wondering how exactly it would be done. I’m not really sure what hook to use for this or how to add this html. Hopefully someone can help, and sorry if this is pretty basic.
- The topic ‘[Resolved] Add a div to the admin bar’ is closed to new replies.