• Treebeard

    (@malawimama)


    We’re having issues with a site that uses the Connections plugin (which is a directory listing businesses). If you search for a business name, it returns no results (Not Found message). I’ve tried adding quotes and that doesn’t do anything either.

    I can see that the DavesWordPressLiveSearchResults.php page has this one line:

    ‘post_type’ => ‘any’,

    which I assume should allow it to search custom post types and return results but it doesn’t seem to be working. I also have another site that uses custom post types, and it’s not working on that one either, so I’m wondering if this is a Bug, or if there’s a way to fix it?

    If anyone knows of a solution I’d really appreciate the help 🙂

    thanks!~

    http://wordpress.org/extend/plugins/daves-wordpress-live-search/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Treebeard

    (@malawimama)

    p.s. – it would be great if there was a way to fix this without altering the plugin files, so it’s not lost during an update 🙂

    Thread Starter Treebeard

    (@malawimama)

    OH I found this other thread that mentions adding code to the functions.php file to search for custom post types: http://wordpress.org/support/topic/how-to-include-custom-post-types-in-search-results-and-archives?replies=17

    This is the code from that post. It looks like they created a custom post type named “folio”:

    function filter_search($query) {
        if ($query->is_search) {
    	$query->set('post_type', array('post', 'folio'));
        };
        return $query;
    };
    add_filter('pre_get_posts', 'filter_search');

    I’m not sure where to look to find out what the Custom Post type is called though. I’ve tried searching the plugin files but I don’t really know what I’m looking for. Maybe this would work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Dave's WordPress Live Search] Custom Post Types = no results’ is closed to new replies.