WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Exclude the first item in search result (2 posts)

  1. ucokpunk
    Member
    Posted 12 months ago #

    Hi,

    How do I exclude the first item from every search result with relevanssi activated? I'm not really familiar with WordPress, but I guess people say something about setting 'offset' to do this. Can someone help me please?

    Thanks.

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

  2. Mikko Saari
    Member
    Plugin Author

    Posted 12 months ago #

    add_filter('relevanssi_modify_wp_query', 'ucokpunk_offset');
    function ucokpunk_offset($query) {
        $query->set('offset', 1);
        return $query;
    }

    This should do the trick.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.