Search Results for 'results.php'

Forums › Forums › Search › Search Results for 'results.php'

Viewing 10 results – 1,251 through 1,260 (of 1,344 total)
  • Author
    Search Results
  • #17834

    Anonymous
    Inactive

    Hi Ross 🙂
    I read in this forum that the best template to use for woocommerce is archive-product.php.
    I’m using the shortcode method, but I don’t understand if I have to modify my results.php page in order to look like archive-product.php (using woocommerce functions, such as do_action( ‘woocommerce_before_shop_loop’)) or if it’s simply a matter of css.
    Now my search works, but the results are in list and not in grid.

    I’m trying to understand by reading your guide here
    https://support.searchandfilter.com/forums/search/woocommerce-page/

    Is it a good start? 🙂

    #17692

    Ross
    Keymaster

    Hey Dmitriy

    To create your layout as you mention is going to require a fair bit of coding – you’ll need some decent knowledge of html/css/js…

    Not sure if you’ve read the differences between archive & shortcode methods:

    http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/display-results/

    Anyway, if you’re trying to create a masonry layout based on something existing in your theme, then the first thing I would do is is copy the html / loop structure from one of your templates that is using masonry,

    Either find the PHP file responsible for displaying the masonry layout in your theme directory, or alternatively view the source HTML of a page which is displaying a masonry layout.

    You’ll have to copy the html over to your results.php – but it might not be straight forward – this will require tweaking.

    In all cases I’m aware of, any true masonry layout requires Javascript, to make everything fit together and stack nicely. You’ll have to figure out how to trigger the masonry via JS in your theme. You’ll need to load the masonry script whenever the page loads, and whenever new results are loaded in – check the first question on the FAQs on how to detect when new results have loaded –

    http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/

    As mentioned above, it requires a certain level of knowledge to get a masonry layout working in your theme.

    Alternatively, if you used the archive method (and overcame any issues there), I’m sure the html structure would already be correct, however you would still need to apply the masonry/JS logic to these pages.

    Thanks

    #17641

    Anonymous
    Inactive

    Sorry, results.php template not reply.php mentioned above.

    #17494

    Anonymous
    Inactive

    BTW, your results.php template has a few missing tags:

    <?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    			
    			<p><br /><?php the_excerpt(); ?><p>
    			<?php 
    				if ( has_post_thumbnail() ) {
    					echo '<p>';
    					the_post_thumbnail("small");
    					echo '</p>';
    				}
    			?>
    			<p><?php the_category(); ?><p>
    			<p><?php the_tags(); ?><p>
    			<p><small><?php the_date(); ?></small><p>
    			
    		</div>
    		
    		<hr />
    		<?php
    	}
    	?>

    Notice a few <p> tags at the end that suppose to be a closing </p> tags.

    #17359

    Anonymous
    Inactive

    Thanks! I followed this:::::
    !!!!!!1.Create a folder in your theme folder called search-filter.
    2.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

    From now on, Search & Filter will load this version of the template instead of its own – so you can make any customisations that are necessary.!!!!!

    Search & Filter works and loads the Divi created Page, However this page does not honor all of the CSS code(as woocommerce and Divi do) and all of the other pages do. Any ideas>? This is my last hurdle!

    #17031

    Anonymous
    Inactive

    and I do this onto the custom results.php page?

    #16973

    Ross
    Keymaster

    Hey Sabrina

    The template: Plugins > search-filter-pro > templates > results.php, is only to be used when displaying results using a shortcode.

    If you are using “as archive” there is no sample template, because it should be a template from your theme.

    Take a look in your theme folder for templates you could use… under “display results” and under “filename” try any of the following: archive.php, search.php or index.php, most themes have these templates as standard.

    Thanks

    #16948

    Anonymous
    Inactive

    Hey,

    I’ve got the settigns: Display as an archived page, and use a custom template for the results. When using the default template in: Plugins > search-filter-pro > templates > results.php, won’t work either. If I create a new template, remove the_loop stuff from WordPress and just print a <h1>Hello</h1>, this will be displayed in a blank page.

    Wordpress version: 4.2.2
    S&F version: 1.4.3

    Does anyone know why it won’t load the template in correctly?

    #16521

    In reply to: Invisible Ajax results


    Anonymous
    Inactive

    Ok, managed it to work !

    For those who use Salient theme : add this to search-filter/results.php :

    <script type="text/javascript">
    
    	<![CDATA[
    	
    		$(".searchandfilter").on("sf:ajaxstart",function(){
    			console.log("ajax start");
    			$('#loader').show();
    		});
    		
    		$(".searchandfilter").on("sf:ajaxfinish",function(){
    			console.log("ajax complete");
    			$('#loader').hide();
    						
    			jQuery.getScript("PATH_TO_YOUR_THEME_DIRECTORY/salient/js/init.js", function(data, textStatus, jqxhr) {
    			   //console.log(data); //data returned
    			   //console.log(textStatus); //success
    			   //console.log(jqxhr.status); //200
    			   //console.log('script.js loaded.');
    			});
    				
    		});
    		
    	]]>
    
    </script>
    #16102

    Anonymous
    Inactive

    Using a custom template for the search results:

    <?php echo do_shortcode('[searchandfilter id="22467"]'); ?>
    
    <?php
    
        $args = array(            
          'post_type' => 'post',
          'posts_per_page' => 10
        );
    
        $query = query_posts($args);
    
    ?>
    <div id="content">
    	<ul>
    <?php while (have_posts()) : the_post(); ?>
    
    <li>
    	<?php the_title();?>
    </li>
    
    <?php endwhile;?>
    	</ul>
    </div>

    I’ve set the filter to use a specific a page template page-category-results.php

Viewing 10 results – 1,251 through 1,260 (of 1,344 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.