A complete guide to Remove Product Meta Tags from Rank Math!
Table of Contents
The Product Meta Tags
Here are the meta tags that I’ll guide you on how you can remove them.
product:brand
product:price:amount
product:price:currency
product:availability
product:retailer:item:id
What Product Meta tag does?
Product meta tags play a crucial role in Search Engine Optimization (SEO) as they help search engines understand the content of your website and determine how relevant it is to a user’s search query. They are HTML tags that provide information about your website to search engines and include meta descriptions, meta keywords, and meta robots tags. Often those are helpful for Social sharing as well.
Why do you need to remove Product Meta Tags?
In some cases, you may want to remove product meta tags from your website, and several reasons can be there. A few possible reasons can be the one mentioned below:
1) You want to exclude specific product pages from search engine results,
2) You’re using a different plugin to generate product meta tags,
3) Even after removing product schema or data, the product meta tags are there.
4) Otherwise, maybe because you don’t need them. :p
Here, a plugin like Rank Math, which indeed is a powerful SEO plugin for WordPress, allows you to manage and optimize the meta tags on your website.
Trust me or not, removing product meta tags or Product-Based OG Tags with Rank Math is super easy! In this article, I’ll be introducing a few filters to remove product meta tags from your product pages.
Filter to remove product meta tags
I’d rather suggest using filters to accomplish this one. As you already know, in WordPress, filters are important because they allow you to modify and manipulate data and output on your WordPress website. Filters allow you to make changes to data before it is displayed on the front-end of your website. Here you can find the necessary filters below; Pick any or all of them and feel free to use the filters without hesitating. It’s safe and won’t harm your site.
[1] Remove product:brand
The meta tag product:brand
contains includes the brand name of the product you’re selling. Like, Apple could be an example of a brand name. Example: <meta property="product:brand" content="Apple" />
add_filter( "rank_math/opengraph/facebook/product_brand", function( $content ) { return false; });
[2] Remove product:price:amount
The meta tag product:price:amount
contains numeric values. It just simply displays the price of the product is available for sale. Example: <meta property="product:price:amount" content="512" />
add_filter( "rank_math/opengraph/facebook/product_price_amount", function( $content ) { return false; });
[3] Remove product:price:currency
The meta tag product:price:currency
contains values like USD
, EUR
, BDT
. Simply, the currency in which you are selling the product. Example: <meta property="product:price:currency" content="USD" />
add_filter( "rank_math/opengraph/facebook/product_price_currency", function( $content ) { return false; });
[4] Remove product:price:availability
The meta tag product:price:availability
contains values like instock, Out of stock,
and On backorder
. This meta tag displays the stock status of your product that can be found in the Inventory tab of your product. Example: <meta property="product:price:availability" content="instock" />
add_filter( "rank_math/opengraph/facebook/product_availability", function( $content ) { return false; });
[5] Remove product:retailer:item:id
add_filter( "rank_math/opengraph/facebook/product_retailer_item_id", function( $content ) { return false; });
How to add filters or Hooks to your WordPress site
I know still some of us get confused about where and how we should add filters or hooks to our WordPress site. For Rank Math, I’d recommend the Knowledge base article that Rank Math published: How to Add a Filter/Hook to Your Website?
Conclusion
In conclusion, removing product meta tags from Rank Math is a simple process that can be done in just a few steps. It’s important to keep in mind that removing product meta tags can have a significant impact on your search engine rankings, so it’s important to make sure that you understand the consequences of your actions before making any changes.
I hope that was helpful. Thanks for your support!
Categories: WordPress, Rank Math, WordPress SEO
Feel free to ask anything regarding the filters in the comment below!