Home How to remove actions from Yoast SEO plugin
Reply: 0

How to remove actions from Yoast SEO plugin

user1195
1#
user1195 Published in June 23, 2018, 2:44 am

I need to remove the actions that Yoast SEO has added. This is my code:

function remove_actions() {

// deregister all not more required tags
    remove_action( 'wp_head', '_wp_render_title_tag', 50 );
    remove_action( 'wp_head', array( 'WPSEO_Frontend', 'test123' ), 50 );
    remove_action( 'wp_head', array( 'WPSEO_Frontend', 'front_page_specific_init' ), 50 );
    remove_action( 'wp_head', array( 'WPSEO_Frontend', 'head' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'head' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'metadesc' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'robots' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'metakeywords' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'canonical' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'adjacent_rel_links' ), 50 );
    remove_action( 'wpseo_head', array( 'WPSEO_Frontend', 'publisher' ), 50 );

}
add_action( 'wp_head', 'remove_actions', 1000 );

This code does not remove the actions. What is wrong? How can I remove the actions successfully?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.39154 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO