Forums Forums Search & Filter Pro Custom Results Page Using Search.php

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #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( '&laquo; prev', 'next &raquo;') ?>
    			</div><!-- .pagination -->
    		<?php else : ?>
    			<?php get_template_part('includes/not-found'); ?>
    		<?php endif; ?>
    	</div><!-- #content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    
    Trevor
    #40938

    Hi, is the reason you want to use the shortcode with search.php so you can put the search on the page also?

    Anonymous
    #41028

    Thank you for your reply. I’m sorry for not being more clear.

    Requirements:
    1. Place search results and search on the same page. Test 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

    Anonymous
    #41029

    1. Place search results and search on the same page. Test page

    (didn’t load first time)

    Trevor
    #41035

    OK. 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.

    Anonymous
    #54703

    Hello Joshua. Have you found a solution? Because I have the same issue.

Viewing 6 posts - 1 through 6 (of 6 total)