• I don’t know if this is in plans yet, but I think it would be great to have a setting to select schema type based on the article category.

    For example, I have a bigger site and I have a News category for news articles and the other for blog posts or researched topics.

    I can be able to set the “News Article” option to the News category and “Article” to the others.

    Thanks

Viewing 1 replies (of 1 total)
  • Put in your functions:

    function change_article( $data ) {
        if (in_category(1)) {
        $data['@type'] = 'NewsArticle';
        return $data; }
    }
    add_filter( 'wpseo_schema_article', 'change_article' );
Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request: Selecting Schema Settings based on Categories’ is closed to new replies.