Customizing rich snippets shown on frontend

#22128
  • Resolved Siddardha
    Rank Math free

    Hello,

    How do I customize the rich snippet shown on front end?

    I would like it to have a different background color and curved borders

    Added links in sensitive area

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can use the following filter to customize the review HTML on the frontend:

    /**
     * Filter to change review display location
     *
     * @param string $html.
     */
    add_filter( 'rank_math/review/html', function( $html ) {
    	return $html;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Sorry, I didn’t understand.
    Is this the css code for customizing the snippet? or something else?

    I am not looking to change the review location. Trying to customize how it looks

    How do I use it? Sorry if it seems like a basic question.

    Thanks

    Hello,

    Thank you for contacting Rank Math today.

    The above filter can be used to customize the HTML output of the review. In your case since you only want to modify the style, you can inspect the review and identify the CSS selectors that you can later use to target with custom CSS.
    For instance the wrapper div is called “rank-math-rich-snippet-wrapper” and you can add some CSS using this class.

    Looking forward to helping you. 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.

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

The ticket ‘Customizing rich snippets shown on frontend’ is closed to new replies.