Remove Rich Snippet from Blog + Archive Pages

#49213
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can disable the automatic insertion of the review snippet by selecting the custom(use shortcode) option on the Rank Math schema options as shown below:
    Schema

    You will then be able to use the shortcode on pages/posts that you want it to appear.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Nate Shivar
    Rank Math business

    Ok – that works. But I was looking for a less manual way to just apply a single filter to exclude the filter them from the blog / archive pages.

    If that filter doesn’t exist, I’ll go back through and do manual updates. Thanks

    Hello,

    Thank you for the additional info.

    In this case, you can apply the following filter to conditionally hide the review display on the frontend:

    /**
     * Filter: Allow disabling the review display.
     *
     * @param bool $return true to disable.
     */
    add_filter( 'rank_math/snippet/review/hide_data',function() {
          if(is_archive()){
            return false;
          }
    	return true;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Nate Shivar
    Rank Math business

    Awesome – thank you!

    Alberto
    Rank Math business

    Hello Nate,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.