• I’m trying to remove the “Purge SG Cache” link in the admin toolbar. I am using the function below which works for removing toolbar items from all other plugins but isn’t working for CachePress. Is there a different node ID that I should be using? I grabbed the ID from the toolbar item
    ID.

    function my_remove_toolbar_items( $wp_admin_bar ) {
    $wp_admin_bar->remove_node( 'SG_CachePress_Supercacher_Purge' );
    }
    add_action( 'admin_bar_menu', 'my_remove_toolbar_items', 999 );

    https://www.ads-software.com/plugins/sg-cachepress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author SiteGround

    (@siteground)

    We will add an option to disable or enable the admin bar in the next update so you won’t have to use that filter.

    anonymized-11892634

    (@anonymized-11892634)

    This works for me:

    function tonykim_filter_admin_bar(){
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_menu('SG_CachePress_Supercacher_Purge');
    }
    add_action( 'wp_before_admin_bar_render', 'tonykim_filter_admin_bar' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove CachePress from admin toolbar’ is closed to new replies.