Support » Plugin: Relevanssi - A Better Search » Index future posts

  • Resolved lklawless


    I really love Relevanssi, but there is one tweak that would make it better for me: I’d like to include future/scheduled posts in search results. I see from the changelog that these are indexed for admin search but I’d like them to show up on the blog as well. I know this is not what most people want, but if there’s a simple hack I can use to make this happen for my site, I’d be very grateful.

    Thanks for a great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari


    Should be easy. Try this:

    add_filter('relevanssi_post_ok', 'ok_future_posts', 11, 2);
    function ok_future_posts($ok, $doc) {
        $status = relevanssi_get_post_status($doc);
        if ($status == 'future') $ok = true;
        return $ok;

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Index future posts’ is closed to new replies.