Wordpress-seo: Turn on or off Make Primary Category

Created on 6 Apr 2016  路  6Comments  路  Source: Yoast/wordpress-seo

Allow users the ability to turn on or off the "make Primary Category" for categories. This feature will benefit users who already have another plugin that is specifically customized to assign a primary category, that which may cause conflict or interfere with the feature in Yoast.

primary category support feature request

All 6 comments

We always want to have a primary category because this benefits SEO. So we will not add a feature toggle to disable the primary category.

@Pcosta88 Have you found a hack that disables this functionality?

@szepeviktor Hi, we highly recommend having a primary category as it will benefit the SEO of your site. While we will not be adding such a feature to disable it you are, however, welcomed to edit and modify the plugin as you see fit. You may need to edit files listed here: https://github.com/Yoast/wordpress-seo/search?utf8=%E2%9C%93&q=primary+category&type=

We do not have any hack or code snippet we can provide to disable the feature. If needed, you may wish to hire a developer or experiment with modifying the plugin on a staging site.

Thank you.
I think I just disable the corresponding JS to visually hide Make primary on CPT-s crowded with taxonomies.

This feature is appearing for other custom taxonomies that makes no sense to be primary or not and it's confusing my authors.

Can this be disabled on a per-custom-taxonomy basis?

Don't use JS for this. With JS it'll always 'blink' for a second before it disappears. Use CSS so that it renders immediately and is never shown. In functions.php, put:

    add_action('admin_head', 'adminStyles');
    function adminStyles() {
      echo '<style>
        .wpseo-make-primary-term {
            display: none !important;
        }
      </style>';
    }

That will hide it before it can ever be seen.

I'm surprised at how many things I have to hide this way when it comes to Yoast, and only Yoast. In my case the 'Make primary' literally made no sense for my CPT they were only being used to organise certain types of content. It had no bearing on SEO as the category structure was never revealed on the front end. Not to mention that it would have confused the hell out of the owner of the site.

Was this page helpful?
0 / 5 - 0 ratings