• Guys,

    I have installed Relevanssi and want to query my custom post only, I need to search by keyword and by custom taxonomy can some one point me in the right direction… note this is a separate search to the main site.

    My custom post is products and my custom taxonmony is customTax

    Here is what I found in the articles I read

    relevanssi_do_query($your_query_object);.

    So I came up with this,

    if(isset($_GET['psearch']))
    				{
    				 		echo 'doing p seach'	;
    
    					$args = array('post_type' => 'products','posts_per_page'=> -1);
    					print_r($args);
    
    					$wp_query = new WP_Query($args);
    					$wp_query ->query_vars['s'];
    					relevanssi_do_query($wp_query);
    
    				}

    But I get no results with Relevanssi enabled, and one without it enabled..

    John

    https://www.ads-software.com/extend/plugins/relevanssi/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jdunneirl

    (@jdunneirl)

    I also notice I get

    Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in /usr/local/pem/vhosts/cc/webspace/httpdocs/wp-includes/functions.php on line 2748

    Plugin Author Mikko Saari

    (@msaari)

    Just add

    <input type="hidden" name="post_types" value="products" />

    in your search form to search only the one post type.

    Thread Starter jdunneirl

    (@jdunneirl)

    Thanks msaari,

    How do I go about search for the title in a certain taxonomy?

    my page has an input and a dropdown,

    so i search by title or / and category

    Plugin Author Mikko Saari

    (@msaari)

    I do not quite understand your question. What do you want to search for?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] No Results’ is closed to new replies.