Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Flector

    (@flector)

    find solution, replace code:

    $tempPosts = get_posts( array(
    				's'           => $term,
    				'numberposts' => $this->options['autocomplete_numrows'],
    				'post_type'   => $this->options['autocomplete_posttypes'],
    			) );

    with

    if (function_exists("relevanssi_do_query") ) {
    			$query->query_vars['s'] = $term;
    			$query->query_vars['posts_per_page'] = $this->options['autocomplete_numrows'];
    			$query->query_vars['post_type'] = $this->options['autocomplete_posttypes'];
    			relevanssi_do_query($query);
    			$tempPosts = $query->posts;	}
    		else {
    			$tempPosts = get_posts( array(
    				's'           => $term,
    				'numberposts' => $this->options['autocomplete_numrows'],
    				'post_type'   => $this->options['autocomplete_posttypes'],
    			) );
    		}

    Plugin Author Gabe Shackle

    (@hereswhatidid)

    I’ll look at adding this in an upcoming release. Thanks for the code!

    I’m using this code on one of my projects now, and it works great, thank you Flector!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Support for Relevanssi’ is closed to new replies.