SHARE
TWEET

Untitled

a guest Jan 16th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Remove Yoast from specific page
  2. function remove_wpseo_from_ads($metatag) {
  3.     if ( is_page(274)) {
  4.         return false;
  5.     } else {
  6.         return $metatag;
  7.     }
  8. }
  9. add_filter('wpseo_canonical', 'remove_wpseo_from_ads');
  10. add_filter('wpseo_opengraph_url', 'remove_wpseo_from_ads');
  11. add_filter('wpseo_opengraph_desc', 'remove_wpseo_from_ads');
  12. add_filter('wpseo_opengraph_title', 'remove_wpseo_from_ads');
  13. add_filter('wpseo_opengraph_type', 'remove_wpseo_from_ads');
  14. add_filter('wpseo_opengraph_site_name', 'remove_wpseo_from_ads');
  15. add_filter('wpseo_opengraph_image', 'remove_wpseo_from_ads');
  16. add_filter('wpseo_opengraph_author_facebook', 'remove_wpseo_from_ads');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top