Is it valid for all sub-categories which are under News Catogory?
Hello,
The sub categories are within the main named category so it should work.
Please try it and let us know.
Thank you
I need to add this code in themes function.php?
Hello,
Thank you for keeping in touch with us.
The first URL returned a NewsArticle
schema type which is correct so I assume you have added the code provided by my colleague:
However, the second post you provided returns an Article
type. If you haven’t added a code for your blog article categories, you may add it like this:
add_filter( "rank_math/snippet/rich_snippet_article_entity", function( $entity ) {
if ( in_category('Blog') ) {
$entity['@type'] = 'BlogPosting';
}
return $entity;
});
Let me know if it works.
Can you check me tell me….
This is a news article:
https://newsangels.com/p-4914
This is a blog article:
https://newsangels.com/p-8326
I approved your reply. Please see my previous reply.
Thank you
Should I add, schema BlogArticle or just Article is fine for bLOG POSTS?
Hi,
Blogposting and Article schema can be used interchangeably.
You can use either for your posts. Article schema is a general schema type and the Blogposting basically describes your posts as blog pages.
Hope this helps
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.