Title: remove duplicate post from admin bar
Last modified: March 18, 2021

---

# remove duplicate post from admin bar

 *  Resolved [nathaniel45](https://wordpress.org/support/users/nathaniel45/)
 * (@nathaniel45)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/)
 * How can I remove duplicate post from the admin bar? I have a custom plugin I 
   don’t want it shown in. I have tried $wp_admin_bar->remove_node(‘duplicate-post’);
   $wp_admin_bar->remove_menu(‘duplicate-post’);

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * (@lopo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14202484)
 * Hi [@nathaniel45](https://wordpress.org/support/users/nathaniel45/),
    you can
   visit `Settings` > `Duplicate Post`, third tab `Display` and disable the “Admin
   bar” option, then save the settings. This will completely hide the admin bar 
   commands. Let us know!
 *  Thread Starter [nathaniel45](https://wordpress.org/support/users/nathaniel45/)
 * (@nathaniel45)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14202521)
 * I was hoping to remove it in one area not everywhere.
 *  Plugin Author [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * (@lopo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14202657)
 * Hi [@nathaniel45](https://wordpress.org/support/users/nathaniel45/),
    oh, I see
   now! Then you should actually use a snippet of code like this:
 *     ```
       add_action( 'wp_before_admin_bar_render', 'custom_remove_menu', 11 );
       function custom_remove_menu() {
          global $wp_admin_bar;
          $wp_admin_bar->remove_menu( 'duplicate-post' );
          $wp_admin_bar->remove_menu( 'new-draft' );
          $wp_admin_bar->remove_menu( 'rewrite-republish' );
       }
       ```
   
 * This is needed because you may actually have a menu with two commands, or just
   a link with the “New Draft” or “Rewrite & Republish” commands.
    Also this way
   you are sure that the code runs after the Duplicate Post code has added the menu/
   links.
    -  This reply was modified 5 years, 2 months ago by [Enrico Battocchi](https://wordpress.org/support/users/lopo/).
 *  Thread Starter [nathaniel45](https://wordpress.org/support/users/nathaniel45/)
 * (@nathaniel45)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14202764)
 * I have tried
 * add_action( ‘wp_before_admin_bar_render’, ‘custom_remove_menu’, 11 );
    function
   custom_remove_menu() { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘duplicate-
   post’ ); }
 * but didn’t have the other 2 and it wouldn’t remove it. I’ll give it another try
   and let you know.
 *  [Priscilla Chapman](https://wordpress.org/support/users/priscillamc/)
 * (@priscillamc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14236599)
 * Hi [@nathaniel45](https://wordpress.org/support/users/nathaniel45/),
 * We haven’t heard back from you in a while so we’re marking this issue as resolved
   due to inactivity.
 * You’re welcome to [create a new forum topic](https://wordpress.org/support/plugin/wordpress-seo/?view=all#new-topic-0)
   if you have any other questions.
 * Thanks for understanding!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘remove duplicate post from admin bar’ is closed to new replies.

 * ![](https://ps.w.org/duplicate-post/assets/icon-256x256.png?rev=2336666)
 * [Yoast Duplicate Post](https://wordpress.org/plugins/duplicate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicate-post/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Priscilla Chapman](https://wordpress.org/support/users/priscillamc/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/remove-duplicate-post-from-admin-bar/#post-14236599)
 * Status: resolved