Forums › Forums › Search & Filter Pro › Custom Results Page Using Search.php
- This topic has 5 replies, 3 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
Anonymous(Private) March 30, 2016 at 2:19 am #40922
I have two versions working perfectly: 1. Shortcode version using default results.php and 2. Archive version using my theme’s search.php.
What I’d like is the theme’s search.php results on the shortcode page, but I’m not sure if 1. It is possible? 2. I have the technical ability to pull it off.
I’ve been searching through documentation and forums for hours and so far all I’ve received is a serious headache. Are you able to please assist me with this? If not, is there some documentation that you can please point me to or lead me in the right direction?
Thank you for your help.
Test page: http://hasfit.com/search-test/
My search.php code:<?php get_header(); ?> <div id="content"> <?php get_template_part('includes/breadcrumbs'); ?> <?php $count = 1; ?> <?php if (have_posts()) : while ( have_posts() ) : the_post() ?> <?php include('includes/loop.php'); ?> <?php if($count%3 == 0){ ?> <div class="clear"></div> <?php }; $count++; ?> <?php endwhile; ?> <div class="clear"></div> <div class="pagination"> <?php pagination( '« prev', 'next »') ?> </div><!-- .pagination --> <?php else : ?> <?php get_template_part('includes/not-found'); ?> <?php endif; ?> </div><!-- #content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Anonymous(Private) March 30, 2016 at 4:55 pm #41028Thank you for your reply. I’m sorry for not being more clear.
Requirements:
1. Place search results and search on the same page.2. Use the same formatting of results from my theme that display when I use the Archive display method with my default custom template Search.php Example
I’ve already completed this task from documentation
Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.php
But I can’t figure out how to edit the file provided Results.php file to return the same styled results as my theme’s Search.php
Thank you for your help,
Joshua
Trevor(Private) March 30, 2016 at 6:11 pm #41035OK. I see. I will take you back your your first post.
What I’d like is the theme’s search.php results on the shortcode page, but I’m not sure if 1. It is possible? 2. I have the technical ability to pull it off.
It isn’t possible using S&F out of the box. BUT. It is possible (but by you, not us as it is not really in the remit of support) to choose to use the shortcode method and to copy over html structure from one to the other. It’s just a drawn-out process of copying over php and html structure and making sure that it works, making sure the theme’s css works with it (adding or changing css classes and HTML markup as necessary). So, it can be done.
Let me know how you get on.
-
AuthorPosts