Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter natpoit

    (@natpoit)

    I tried everything, not working.
    I have 5 testimonials, 3 published, 2 – pending.
    But on the page I see all 5 in random rotation

    my code is
    [testimonials limit=3 paging=false char_limit=0 random=true]

    Plugin Author Subharanjan

    (@subharanjan)

    Hi Natpolt,

    I am sorry about the troubles.

    By default it only displays the testimonials which are published and not the ones with Draft/Pending status. Please check if you have used pre_get_posts anywhere in the code-base which might be doing something like the below code which effects all the queries on front end.

    function allow_pending_posts( $qry ) {
        $qry->set( 'post_status', array( 'publish', 'pending' ) );
    }
    add_action( 'pre_get_posts', 'allow_pending_posts' );

    If this doesn’t help, please deactivate all other plugins, change the theme to any of the default themes and check.

    Thanks !!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to don't display testimonials with Draft/Pending status’ is closed to new replies.