The MU forums have moved to WordPress.org

Adding admin-bar to wp-admin menu (9 posts)

  1. easysleeper
    Member
    Posted 15 years ago #

    I've searched everywhere for this answer, don't see it so here is the question:

    I inserted wp_footer() in admin-footer.php and it shows the menu items at the bottom of the admin screens in wpmu. What do I need to add in order to have it show the menu as it normally would at the top? How do I point it to the style sheet? Everything I see makes me think this should be working.

    Thanks!

  2. tanvir
    Member
    Posted 15 years ago #

    what're you trying to do by putting wp_footer() at admin-footer.php???

  3. easysleeper
    Member
    Posted 15 years ago #

    well I am trying to add the admin bar to the admin panel as I said in my question.

    It does succeed in doing this only it's not formatted properly and I can't find where the mapping to the style sheet is getting lost.

  4. tanvir
    Member
    Posted 15 years ago #

    the best way is using the firebug plugin of firefox. you can find the CSSs of admin panel at wp-admin\css unless you use some plugin to change the admin panel. If you use any plugin the look for the css at plugin folder.

    But as I told at the beginning, best way to find out is firebug plugin of Firefox.

  5. andrea_r
    Moderator
    Posted 15 years ago #

    Are you trying to add an admin bar in the backend or one to the front side of the blogs?

    In 2.7 there's already an admin bar.

  6. easysleeper
    Member
    Posted 15 years ago #

    I want to add it to the backend.

  7. dsader
    Member
    Posted 15 years ago #

    I use an Admin bar based on http://www.bigalex.it/plugins/adminbar/

    With the following...
    Front end template hooks:

    add_action('wp_footer', 'add_wpadminbar');
    add_action('wp_head', 'add_wpadminbar_style');

    and backend admin hooks:

    add_action('admin_head', 'add_wpadminbar_style');
    add_action('admin_footer', 'add_wpadminbar');
  8. easysleeper
    Member
    Posted 15 years ago #

    Ok I finally fixed this on my own, for those who search and find this the solution to the problem is to insert not only <?php wp_footer(); ?> in the admin_footer.php but also insert <?php wp_head(); ?> into admin_header.php, both files are in the wp-admin folder and this will add your admin bar to your backend just like it shows up in your themes.

    Easysleeper

  9. dsader
    Member
    Posted 15 years ago #

    Why add duplicate hooks to core admin files if hooks are already there? Why can't your adminbar use existing admin hooks instead?

About this Topic

  • Started 15 years ago by easysleeper
  • Latest reply from dsader