WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. creatile
    Member
    Posted 1 year 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 1 year 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 1 year ago #

    Glad you found the solution.

  4. TC.K
    Member
    Plugin Author

    Posted 1 year 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 1 year ago #

    This also works for me
    Thanks

  6. Kellyta_P
    Member
    Posted 1 year 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 1 year ago #

    @Kellyta_P, how you include your template?

  8. Kellyta_P
    Member
    Posted 1 year 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 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.