Site logo

Archived topic

Rating in affiliate box

6 replies · Started by Ramsha Afzal on July 5, 2022

Viewing posts 1–7 of 7

Hi,

I am using affiliatable boxes and it has a rating option that shows in every top 3 picks. It takes a lot of time to remove rating from HTML in every post. Can you please give me a code that I can put in additional CSS of generatepress for not displaying rating in top 3 boxes in all posts.

Link in the private box area.

Hi,

I am using affiliatable boxes and it has a rating option that shows in every top 3 picks. It takes a lot of time to remove rating from HTML in every post. Can you please give me a code that I can put in additional CSS of generatepress for not displaying rating in top 3 boxes in all posts.

Link in the private box area.

Hi there,

try this CSS:

.cg-cb-rate {
    display: none;
}

This code also removes the stars. I only want to removing the rating count and intend to display the 5 stars only. Plus, also let me know if this code will remove each rating anywhere on the site? I mean if we put the article rating schema, will the code also hide that rating from Google?

Try this instead:

.cg-cb-rate .aff-score {
    display: none;
}

It will apply to anywhere those same elements are displayed.
It's CSS so it will not affect any other code such as JSON-LD schema. But i cannot say how Google will interpret schema for a 'value' such as the rating when it is not visible on your site.

No, I only apply list schema, article schema (auto generated by Yoast), and book schema that I was actually talking about. See the image. So I was asking if the code will affect the book schema or not.

CSS shouldn't have an effect on the schema but this isn't something we can confirm as David mentioned above.

You might need to do a bit more research on this as it's not a theme related issue.

This archived topic is closed to new replies.