Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 38 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save atomtigerzoo/7b32bd26668e9f471e503c85e345e942 to your computer and use it in GitHub Desktop.
Save atomtigerzoo/7b32bd26668e9f471e503c85e345e942 to your computer and use it in GitHub Desktop.
Wordpress: Disable Yoast SEO on Custom Post Type
function my_remove_wp_seo_meta_box() {
remove_meta_box('wpseo_meta', YOUR_POST_TYPE_NAME_HERE, 'normal');
}
add_action('add_meta_boxes', 'my_remove_wp_seo_meta_box', 100);
@mailsondias
Copy link

Thanks for sharing!

@atomtigerzoo
Copy link
Author

You're welcome - glad it helped :)

@JayHoltslander
Copy link

❤️

@calvinbramlett
Copy link

Exactly what I was needing. Thanks.

@andredaniel
Copy link

Perfect!

@davehamer
Copy link

Thanks!

@alex-ahumada
Copy link

Thanks!

@meetawahab
Copy link

@alexapgutierrez
Copy link

It works, thanks :)

@hayatbiralem
Copy link

Thanks :)

@majdagithub
Copy link

Thanks!

@geochanto
Copy link

geochanto commented Apr 29, 2019

I found that I can use this for multiple post types as well. just pass an array as the second argument:

function my_remove_wp_seo_meta_box() {
	remove_meta_box('wpseo_meta', ["Post_Type_1","Post_Type_2"], 'normal');
}
add_action('add_meta_boxes', 'my_remove_wp_seo_meta_box', 100);

@ipatovstyle
Copy link

I found the answer without coding
111

@simplenotezy
Copy link

If you'd also like to remove the "Internal Linking" seo box below, use this:

remove_meta_box('yoast_internal_linking', 'your_post_type_here', 'normal');

image

@MrSiir
Copy link

MrSiir commented Jan 7, 2021

Thanks!

@glebkema
Copy link

Thanks!

@ArneSaknussemm
Copy link

Thanks!

@ScottJFreeman
Copy link

I found the answer without coding
111

This hides it everywhere, not just for a specific custom post type.

@mfru
Copy link

mfru commented May 3, 2022

image

It is possible to disable Yoast granularly now, also for custom post types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment