Support » Plugin: Relevanssi - A Better Search » relevanssi_hits_filter can I filter results BETWEEN dates

  • Before I dig into relevanssi, I was wondering if anyone could tell me if it is likely that I could filter the results further with the relevanssi_hits_filter with the wp date range filter: function filter_where:

    <?php
    function filter_where($where = ”) {
    $where .= ” AND post_date >= ‘2009-05-01’ AND post_date <= ‘2009-05-15′”;
    return $where;
    }
    add_filter(‘posts_where’, ‘filter_where’);
    query_posts($query_string);
    ?>

    http://wordpress.org/extend/plugins/relevanssi/

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

    (@msaari)

    Yes, you can, but the code is a bit different. Relevanssi_hits_filter will give you an array containing the search results, and you can build a function that keeps only the results that fall in the date range.

Viewing 1 replies (of 1 total)
  • The topic ‘relevanssi_hits_filter can I filter results BETWEEN dates’ is closed to new replies.