Yoast SEO
Remove SEO from Custom Post Types (22 posts)

  1. Ligefrem
    Posted 3 years ago #

    I'd like for this plugin not to work on custom post types (because they are products in my webshop and I have another SEO plugin better for that specific purpose)

    How would I go about doing that? In the All in on SEO plugin I could just select if there where post types I didn't want to plugin to work for. ButI can't find that option here.


  2. Ivica Delic
    Posted 3 years ago #

    It seems that this option is removed from the latest WordPress SEO version as it was initially added in version 0.2, check it here:


    User's attempt:

    If this is true, it's pity as this is very important part when you use custom post types.

  3. Willem-Siebe
    Posted 3 years ago #

    @Ligefrem, do you use Jigoshop. Because I asked the same question one week ago.

    @IvicaD, this is not good news for us then!

    @Yoast, is there a way to get this back in the plugin again?

    Kind regards,


  4. Ligefrem
    Posted 3 years ago #

    Yep, Jigoshop it is

  5. Willem-Siebe
    Posted 3 years ago #

    OK, if you get it working or have any news, let's update each other ;-).

  6. martha_camellia
    Contributor Day Volunteer
    Posted 3 years ago #

    I need this too!

  7. Ivica Delic
    Posted 3 years ago #

    I need it to, in case if I wasn't clear enough... I hope this would be possible in the near future.

  8. AMediaCompany
    Posted 3 years ago #

    Hello, I worked this out because I was could not work out why it was disabled. See my enable Yoast SEO post to show how you can enable/remove it

  9. martha_camellia
    Contributor Day Volunteer
    Posted 3 years ago #

    AMediaCompany, thanks for adding your findings here.

    I believe that changing the 'public' value in register_post_type() has consequences beyond the SEO plugin that may not be desirable.

    For my own situation, I found that disabling the appearance of the SEO meta-box on the custom post's edit page was sufficient. (That's in the SEO settings: Titles & Metas, Post Types Tab, "WordPress SEO Meta Box Hide" Checkbox for each post type).

  10. AMediaCompany
    Posted 3 years ago #

    martha_camelia, perhaps it does. In the case where you can use the Yoast SEO options to tick something on/off, then great. In my case I was not able to, hence I noted what I did. I'd rather not use public=> true

  11. Willem-Siebe
    Posted 3 years ago #

    To remove Yoast SEO from a post type:
    Make sure your post type does not contain the following code in the register post type:

    'public' => true

    Where can I find this file, maybe I can change it to get it work.

    Kind regards,


  12. AMediaCompany
    Posted 3 years ago #

    it depends on where your custom file type is defined.

    I'd recommend doing what do what martha_camelia says first and look into the options of wordpress-seo and you could be able to remove it there

    If via a plugin, take a look at the plugin
    if in functions.php, take a look there
    if in a file that functions.php includes, look there.

    If you've no idea, contact the person who designed/built your site. If you really haven't got a clue, ask someone you trust to look at it. Remember, I'm just someone on the internet

  13. Willem-Siebe
    Posted 3 years ago #

    Hi there, well in the file jigoshop_taxonomy.php from the Jigoshop plugin I found the code the use for registering the custom post type. And yes, there is a statement 'public' => true. What Martha_Camelia did is not working for me, on the Jigoshop forum I posted before:

    Hi Ivica, I did a lot of testing to see where the problem maybe is. For sure I can tell you that the 'hide option' just hide the form but that's not a function to enable/disable that part. I still got no answer from Yoast how I can do that. Anyone else with same problems?

    Do you advise me to change the code for the Jigoshop plugin? Meaning: removing the line public - true. In my first thought I was thinking we should change something to the SEO plugin not to handle this custom posttype by Yoast SEO...

    Hope to hear from you!

    register_post_type( "product",
    			'labels' => array(
    				'name'               => __( 'Products', 'jigoshop' ),
    				'singular_name'      => __( 'Product', 'jigoshop' ),
    				'all_items'          => __( 'All Products', 'jigoshop' ),
    				'add_new'            => __( 'Add New', 'jigoshop' ),
    				'add_new_item'       => __( 'Add New Product', 'jigoshop' ),
    				'edit'               => __( 'Edit', 'jigoshop' ),
    				'edit_item'          => __( 'Edit Product', 'jigoshop' ),
    				'new_item'           => __( 'New Product', 'jigoshop' ),
    				'view'               => __( 'View Product', 'jigoshop' ),
    				'view_item'          => __( 'View Product', 'jigoshop' ),
    				'search_items'       => __( 'Search Products', 'jigoshop' ),
    				'not_found'          => __( 'No Products found', 'jigoshop' ),
    				'not_found_in_trash' => __( 'No Products found in trash', 'jigoshop' ),
    				'parent'             => __( 'Parent Product', 'jigoshop' )
    			'description'         => __( 'This is where you can add new products to your store.', 'jigoshop' ),
    			'public'              => true,
    			'show_ui'             => true,
    			'capability_type'     => 'product',
    			'map_meta_cap'        => true,
    			'publicly_queryable'  => true,
    			'exclude_from_search' => false,
    			'hierarchical'        => false, // Hierarchial causes a memory leak http://core.trac.wordpress.org/ticket/15459
    			'rewrite'             => array( 'slug'=> $product_base, 'with_front'=> false, 'feeds'=> $base_slug ),
    			'query_var'           => true,
    			'supports'            => array( 'title', 'editor', 'thumbnail', 'comments', 'excerpt',/*, 'page-attributes'*/ ),
    			'has_archive'         => $base_slug,
    			'show_in_nav_menus'   => false,
    			'menu_position'       => 56
  14. AMediaCompany
    Posted 3 years ago #

    it may or may not work; I've no knowledge of how the jigoshop plugin works.

    I was assuming that you wanted to remove the form from the backend, which removing public=>true should work, but I have no idea how it would affect the plugin

    To remove it from the front-end, on that post type (so you could safely ignore the SEO box on that plugin), I'm guessing you could remove the filter hooks that are used. I've not got a list of those, so you will be having to look around to see what needs to stop output on the front-end.

  15. Ivica Delic
    Posted 3 years ago #

    I asked Jigoshop developers if they have any idea on this, I'm waiting to see if there would be any ideas, hopefully yes...

  16. Willem-Siebe
    Posted 3 years ago #

    @AMediaCompnany and IvicaD, thanks for the quick reply's. Ivica, I will not change anything before we got answer from the devolopers. Keep me posted :-).

  17. Ivica Delic
    Posted 3 years ago #

    No problem, as soon as I get any info on this I'll forward it to you guys...

  18. waterjerome
    Posted 3 years ago #

    Me too please.

  19. Ivica Delic
    Posted 3 years ago #

    @siebje and others Sorry for bringing bad news, but I didn't get any feedback from none developers... sorry. It seems we are stuck. :-(

  20. Willem-Siebe
    Posted 3 years ago #

    Mmm, not so nice... :-(

  21. scorpiotechnologies
    Posted 3 years ago #

  22. Piet Bos
    Posted 3 years ago #

    to get rid of the WordPress SEO metabox for a custom post type you can use this function:

    // get rid of WordPress SEO metabox - adapted from http://wordpress.stackexchange.com/a/91184/2015
    	function prefix_remove_wp_seo_meta_box() {
    	    remove_meta_box( 'wpseo_meta', 'custom-post-type', 'normal' ); // change custom-post-type into the name of your custom post type
        add_action( 'add_meta_boxes', 'prefix_remove_wp_seo_meta_box', 100000 );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic