• Hi I’ve enabled rating widget to all my posts and pages and I want to exclude the widget from the home page and some other pages but exclude is not working I’ve entered page id’s and separated with, comma it’s not working like this: 7093,11981 . can anybody give me a hand?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Blaz K.

    (@blazk)

    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)

    Plugin Support Blaz K.

    (@blazk)

    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’ );

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

The topic ‘exclude post or page id from displaying widget’ is closed to new replies.