Forums

WP Query Search Filter
[resolved] Display results on specific template (9 posts)

  1. creatile
    Member
    Posted 6 months ago #

    I think results are displayed on search.php. How can I display the results on a specific template ?

    http://wordpress.org/extend/plugins/wp-query-search-filter/

  2. creatile
    Member
    Posted 6 months ago #

    I found a solution with conditional statement in my search.php template

    <?php if ( $post->post_type == 'post' ) : ?>
    
    <?php endif; ?>
  3. TC.K
    Member
    Plugin Author

    Posted 6 months ago #

    Glad you found the solution.

  4. TC.K
    Member
    Plugin Author

    Posted 6 months ago #

    In case you don't to want to messed up with your original search result. You can use this as your conditional statement.
    <?php if($_GET['s'] == 'wqsf09be82574' ) { ;?>
    Which is the identifier for wqsf.

  5. creatile
    Member
    Posted 6 months ago #

    This also works for me
    Thanks

  6. Kellyta_P
    Member
    Posted 4 months ago #

    Hi:
    I can't resolve this. I need a different template for search results with this plugins, but when I use the code that you get:
    <?php if($_GET['s'] == 'wqsf09be82574' ) { ;?>
    The search results page don't shows any result at all.
    Thanks

  7. TC.K
    Member
    Plugin Author

    Posted 4 months ago #

    @Kellyta_P, how you include your template?

  8. Kellyta_P
    Member
    Posted 4 months ago #

    Hi:
    well, I try with put directly the code with conditional statement between <?php if($_GET['s'] == 'wqsf09be82574' ) { ;?> <?php }?>.
    Then, I try put the code in another template and make the call with "locate_template", but nothing works, and the regular search works perfectly :(

  9. TC.K
    Member
    Plugin Author

    Posted 4 months ago #

    I can't really tell what is the problem. Have u include the template in the loop? Can you show your script here?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.