Timeline for Move WP Admin Bar
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 26, 2020 at 4:54 | comment | added | Michael | as far as I understand, the adminbar gets loaded via jQuery into its location just inside the body tag; unhooking the function from 'wp_footer' and hooking it into a different location within the theme would not change that. using just CSS to change from 'fixed' to 'absolute' and to new coordinates would be quite challenging in a responsive theme. | |
Feb 26, 2020 at 3:35 | comment | added | Jacob Peattie | Did you read the full answer? You need to also override its CSS so that it doesn't float. | |
Feb 25, 2020 at 23:02 | comment | added | deleted-user | Thank you. I am still unfortunately not able to get it to work. This is the code that the theme developer gave me to try: remove_action( 'wp_footer', 'wp_admin_bar_render', 0 ); add_action( 'generate_after_header', 'wp_admin_bar_render', 20 ); When I put it in my themes functions.php file. It does nothing. It doesn't even remove the WP Bar. However, when I use this code: function hide_admin_bar(){ return false; } add_filter( 'show_admin_bar', 'hide_admin_bar' ); It successfully removes the WP bar. Now I need to find a way to add the WP bar below the theme's header. Any ideas? | |
Feb 25, 2020 at 17:34 | history | answered | fuxia♦ | CC BY-SA 4.0 |