• Resolved madeleod

    (@madeleod)


    Hi,
    I am just trying to hide by css some items from the front-end admin bar.
    I was able to find lot of hooks to completely remove the front-end admin bar, but not some of elements of it.
    Is anyone could help me out?

    I removed from the back-end already by diplay: none the #wpadminbar#wp-admin-bar-new-content, #wpadminbar#wp-admin-bar-comments, #wpadminbar#wp-admin-bar-updates.
    I sounds like the front and back-end ids are the same. Am I wrong?
    How can I deal with and separate the instructions depending on the front or back-end admin bar?
    Thanks for your help
    Mad.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Joshua Goodwin

    (@joshuagoodwin)

    If you want to hide things from the front-end admin bar, you could put the necessary CSS in your active theme’s style.css file.

    Otherwise, remove_node() is one useful function you could use. If you wanted to make this specific to one of the front- or back-ends, you could wrap it in an is_admin() (or !is_admin(), for the opposite) condition:

    [...]
    if ( is_admin() ) {
    $wp_admin_bar->remove_node('[...]');
    }
    [...]
    Thread Starter madeleod

    (@madeleod)

    thx for your response. I’ve tried with remove_node or remove_menu. It doesn’t work for me. Or perharps I am not good enough to use it.

    I basicaly was looking for the appropriate css for the front-end admmin bar that I ‘ve noticed its location intp the footer id.
    Any idea of how the syntax would be?
    thx again
    mad

    Thread Starter madeleod

    (@madeleod)

    Ok, I found partially the solution. I split my functions back-end and front-end. And now it works!
    Thx for your help.
    Mad.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removiing items from front-end admin bar’ is closed to new replies.