Front-end Shortcode

#30920
  • Resolved Boris Bakovic
    Rank Math free

    Hello!

    I’ve been having a problem with placing the richsnippet shortcode.

    The thing is – when using the event richsnippet (and others for that matter, but I’ll only talk about the event snippet) I really don’t find the shortcode generated info appealing. If I paste the shortcode within the text on my blog post, it just ruins the entire experience.

    Also, it generates the featured image that I set in wordpress as the photo for the snippet. It’s not necessarily bad, but I don’t want that to appear in my blog post because it ruins the entire design and flow of my text.

    Is there a way I can just not include the shortcode in my text or is there any way to design the visual that the shortcode generates to make it more appealing for my site?

    And lastly – is there a way I can turn off the title and meta description inside the rich snippet in my blog post? I don’t want that to appear, I want only the stars rating or whatever else to appear without the picture, title and description.

    Sorry for a long post and I hope you’ll be able to provide me with some answers.

    Awesome plugin, by the way. Just having some issues setting it all up since I’m a new user.
    Thanks!

    • This topic was modified 4 years, 2 months ago by Boris Bakovic.
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    For the first and second question, I can suggest that you make use of your browser inspector to identify the classes on the review snippet preview div and hide/style the elements to match the styles on your theme.

    You can also override the HTML used on the snippet preview by using the following code snippet in your theme’s functions.php file:

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

    Please note that adding the shortcode is completely optional but failing to add the shortcode might prevent Google from rewarding your site with the rich snippets.

    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 1 replies (of 1 total)

The ticket ‘Front-end Shortcode’ is closed to new replies.