WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After studying several blogs, I figured out that to add/edit/delete admin bar items need to do something like this:

add_action( 'wp_before_admin_bar_render', 'wpse20131211_admin_bar' );

function wpse20131211_admin_bar() {
   global $wp_admin_bar;

But with this I can remove comments links, wp logo etc. But can't remove the Post link under the + New menu on the admin bar.
post link under admin bar

I tried with:


and similarly with 'posts', 'add-post' etc. But failed.

share|improve this question
up vote 1 down vote accepted

Try this:

$wp_admin_bar->remove_node( 'new-post' );

It will remove Post link under the admin bar's + New link.

LEARN MORE: remove_node() - WordPress Codex

share|improve this answer

Yes you can use following code for removing new post from admin bar using remove_node.

add_action( 'admin_bar_menu', 'wpse126067_remove_newpost', 999 );

function wpse126067_remove_newpost ( $wp_admin_bar ) {
    $wp_admin_bar->remove_node( 'new-post' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.