WP Query Search Filter
[resolved] Can I show search results on a custom view-template (using Views Plugin)? (3 posts)

  1. TazG
    Posted 3 years ago #

    I'm loving this plugin, but I can't make it play nice with the Types (custom post types and taxonomies) and Views (custom post type displays) plugins from OnTheGo Systems.

    I used Types to create a custom post type with several custom taxonomies. I'm using WP Query Search Filter to display a user filterable list of those custom taxonomies (which rocks the house). But when the search results come back, they are displayed using the standard search results format. I need the results to be displayed on a custom view that I created with the Views plugin.

    The Views plugin lets users assign a custom view layout to the search results, but that effects ALL search results. I need to use a custom layout only when performing searches with WP Query Search Filter. In other words, the standard search results show up using the standard search results format. WP Query Search Filter search results show up using a custom view-template from the Views plugin.

    If I can get this to work, I've solved a problem I've been working on for years.

    Has anyone here worked with the Types and Views plugins, and solved this mystery?



  2. TC.K
    Plugin Author

    Posted 3 years ago #

    I don't know much about view plugin as it is not open source plugin, and no api document available.

    Basically if you want to use different template for search result, you should editing the search.php like this in the loop, for example;

    if($_GET['s'] == 'wqsf09be82574' )//to identify is the search result from wpsf
    <--! here you can styling your result for wpsf result! or use get_template_part() to include the template that you need to use-->
  3. TazG
    Posted 3 years ago #

    Understood! I'll give it a go. Thanks very much for providing the example. I believe it will put me on the right track.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.