Hello,
Thanks for contacting us.
The Keywords section in the Article schema is used to add the Keywords in the schema data. Focus Keywords, by the variable %keywords%, are added by default in this field.
As you specify focus keywords on your posts or pages, the Keywords field in the Article schema would be populated automatically.
However, if you wish to manually enter the keywords, then you can enter them without any spaces and by separating them with a comma. There is no limit in entering the number of keywords in this field, however, do note that specifying a huge number of keywords in this field is not going to help the website’s SEO.
I suggest you, either leave this field with its default value or specify a reasonable number of keywords.
Hope this helps.
Thanks.
For some reason, keywords Schema Builder are not automatically added.
In order for Schema to display keywords, I need to go to each post, go to the Schema Builder, resave, and only then will I see the specified keywords when checking the Schema.
Hello,
Thanks for your reply.
Please add the below code snippet at the end of your theme’s functions.php
file to add the keywords in the Article schema of all the existing posts.
add_filter( 'rank_math/snippet/rich_snippet_article_entity', function( $entity ) {
$entity['keywords'] = get_post_meta( get_the_ID(), 'rank_math_focus_keyword', true );
return $entity;
});
Please let us know how that goes.
Thanks.
Thank you!
Perfect solution! The keywords are now there.
But records that say “Schema – Service” do not have keywords in Schema.
Hello,
Thanks for your reply and we’re glad that the snippet helped.
I’m not sure whether I fully understand the question. But I’ll do my best–and please let me know if I misunderstood!
If you’re saying that the Keywords field is not available in the Service schema, then yes, the Keywords field is added only to the Article Schema.
As by default, the keyword field is populated by Focus Keywords, adding the keywords field to multiple schemas would duplicate the data, and displaying identical data multiple times on the page is not a good practice from an SEO point of view.
Hope this helps in further clarifying the doubts.
Thanks.
Thank you, you helped me a lot, I understood everything!
Don’t delete the code snippet in functions.php?
Hello,
Thank you for the follow-up, and sorry for the delay.
We are glad it worked for you. You may need the code in your functions.php to add the keywords in the Article schema of all the existing posts.
I hope that helps. If you have any other concerns, please don’t hesitate to contact us anytime to assist you further with anything else.
Thank you.
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.