Rank Math adds the keyword data to the Article Schema by default, and if that isn’t desirable, we’re incredibly sorry for the inconvenience caused.
In this knowledgebase article, we’ll show how to remove keywords data from Article Schema.
The keywords are added to the Article Schema to submit them to the search engines. Here’s how Rank Math displays the keyword in the Schema.
If you wish to remove them, you’ll have to add a filter/hook to your website. There are various ways to add filter to your website. You can further refer to our dedicated tutorial on how to add a filter/hook to your website.
We have used the Code Snippets plugin, to add the snippet to the website’s rank-math.php file. You can also add the code snippet in the rank-math.php file.
To do so, first install and activate the Code Snippets plugin from Plugins → Add New section of your WordPress dashboard.
Once the plugin is installed and activated, add the below filter by navigating to Snippets → Add New from your WordPress dashboard.
add_filter('rank_math/snippet/rich_snippet_article_entity', function( $entity ) {
unset( $entity['keywords'] );
return $entity;
});
Here’s how the filter/hook will look in the code editor.
Once done, click on the Save Changes button to save your changes.
Once the filter is added to your website, the keywords will be removed from the Article Schema.
If you still have questions – you’re always more than welcome to contact our dedicated support team. We’re available 24/7, 365 days a year…