• Resolved PDXDesigner

    (@pdxdesigner)


    Hello,

    Great plugin you have developed.

    The search bar works great and displays the results perfectly.
    However, nothing is showing on the search results page.
    I have special coding in the search.php template to show results but still nothing.
    The title shows but no results.

    Is there any special I need to do in the template to get it to display the results?

    Thanks,
    Steve

    http://wordpress.org/extend/plugins/ajaxy-search-form/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Naji Amer

    (@n-for-all)

    this plugin doesn’t change the search.php file in any way, it is limited only to the search box

    I was having a similar issue, turns out when I put the following code in the top section of my search.php file I started getting better results (my custom post type slug is ‘attorney’, change to best suite your needs). Hopefully this snippet will help!

    global $query_string;
    
    $query_args = explode("&", $query_string);
    $search_query = array( 'post_type' => array( 'post', 'page', 'attorney' ) );
    
    foreach($query_args as $key => $string) {
    	$query_split = explode("=", $string);
    	$search_query[$query_split[0]] = urldecode($query_split[1]);
    } // foreach
    
    $search = new WP_Query($search_query . '&');
    Plugin Author Naji Amer

    (@n-for-all)

    Dear rodne,

    there is no need to edit or change your search.php default query, wordpress already searches custom post types, however when u create a custom post type there are 2 fields that should be set for wordpress to search this custom type

    public and exclude_from_search, those are set when u create the custom post type that you want.

    read more about it here

    http://codex.wordpress.org/Function_Reference/register_post_type

    cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Ajaxy Live Search] Search Results’ is closed to new replies.