Advertisement
rAthus

[WP] remove Yoast SEO box from specific CPT types

Mar 21st, 2024 (edited)
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2.    
  3.     // remove Yoast SEO box from specific CPT types
  4.     function remove_yoast_seo_meta_box() {
  5.         remove_meta_box('wpseo_meta', array('my-cpt-1','my-cpt-2','my-cpt-3'), 'normal');
  6.     }
  7.     add_action('add_meta_boxes', 'remove_yoast_seo_meta_box', 100);
  8.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement