Snippet to remove modified date for woo commerce product pages.

#206432
Viewing 1 replies (of 1 total)
  • Ankit
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Please read this article:

    https://webmasters.googleblog.com/2019/03/help-google-search-know-best-date-for.html

    Google won’t give a definitive, single answer for how they pick a date. There are several ways through which Google picks the date to be shown in the search results.

    One of the most prominent ways (in our experience), is the date shown by the theme on the page. Google usually picks and shows the date they see in the content itself and show it in the SERPs.

    If you want to remove the og:updated_time from your OpenGraph meta tag, Please add this code to your current theme’s function.php file.

    add_filter( "rank_math/opengraph/facebook/og_updated_time", function( $content ) {
    
    	 if(is_product() ) {
    	 $content = '';	
          }
    
         return $content;
    });

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Snippet to remove modified date for woo commerce product pages.’ is closed to new replies.