Hi @parsamrz,
are you sure you have the right IDs? On your front page the ID is 4336 from what I see.
Regards,
Blaz
Hello, I am having the same issue.
Disable rating plugin on certain posts is working only in part, NOT excluding from the blog page, like it used to.
Please see https://care-coop.com/resources/, all posts with the word “Story” in the title (Dave’s Story, Sandy’s Story, Siri’s Story) should NOT show any result widget.
Thank you!
Melissa
I have double-checked IDs and they are correct. Plugin is properly disabled on post. (Just not blog or filtered results page)
Hi @weareinspired,
that is correct, exclude rating/result widget does not have impact on the display of ratings on archive pages – it only works within posts, pages and CPT. I added this feature on the roadmap.
In the meantime you can put all posts which shouldn’t display ratings in a separate category and utilize the rmp_archive_results filter to hide ratings on archive pages only for these posts.
See example:
function blazzdev_exclude_category( $content ) {
if ( is_category( 'test-category' ) ) { // adjust the slug
return false;
} else {
return $content;
}
}
add_filter( 'rmp_archive_results', 'blazzdev_exclude_category' );
This will hide ratings in category with slug test-category.
Regards,
Blaz
-
This reply was modified 5 years, 11 months ago by
Blaz K..
Thank you, Blaz.
1. How do I “utilize the rmp_archive_results filter to hide ratings on archive pages only for these posts”? If I disable: Settings > Archive Pages > Show ratings on archive pages, the results widget is disabled on Blog pages, which I do not want…
2. Where do I add this code?
function blazzdev_exclude_category( $content ) {
if ( is_category( ‘test-category’ ) ) { // adjust the slug
return false;
} else {
return $content;
}
}
add_filter( ‘rmp_archive_results’, ‘blazzdev_exclude_category’ );
Thank you, Blaz.
1. How do I “utilize the rmp_archive_results filter to hide ratings on archive pages only for these posts”? If I disable: Settings > Archive Pages > Show ratings on archive pages, the results widget is disabled on Blog pages, which I do not want…
2. Where do I add this code?
function blazzdev_exclude_category( $content ) {
if ( is_category( ‘test-category’ ) ) { // adjust the slug
return false;
} else {
return $content;
}
}
add_filter( ‘rmp_archive_results’, ‘blazzdev_exclude_category’ );