Relevanssi - A Better Search
[resolved] Index future posts (3 posts)

  1. lklawless
    Posted 3 years ago #

    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!


  2. Mikko Saari
    Plugin Author

    Posted 3 years ago #

    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;
  3. lklawless
    Posted 3 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic