Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 441 through 450 (of 1,224 total)
  • Author
    Search Results

  • Trevor
    Participant

    The results.php file needs a different structure to be use for infinite scroll. Tow exemplar results templates are given with the plugin (look the in the plugin templates folder), but the file must be named either results.php OR 1234.php (or whatever the form ID is).

    I am assuming your customised version is in a sub flder of the child theme already?

    #188996

    Trevor
    Participant

    Hi John. I will be on this in a while. Are you using our Shortcode Display results method, and did you customise the results.php file if you are?

    #188721

    Anonymous
    Inactive

    I just updated to WordPress 4.9.8 and I’m on Search & Filter Pro Version 2.4.5.

    Since the update my page displays this:

    [searchandfilter id=”160″ show=”results”]

    …instead of the actual results.

    I have a customized the results.php file, which was working perfectly until this update. Any pointers for how to troubleshoot this?

    #188561

    In reply to: Little improvements


    Trevor
    Participant

    You can replace the contents of the results.php with this:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      https://searchandfilter.com
     * @copyright 2018 Search & Filter
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Companies<br />
    	
    	<?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>';
    				}
    			?>
    			
    		</div>
    		
    		<hr />
    		<?php
    	}
    }
    else
    {
    	echo "No Results Found";
    }
    ?>

    I am not sure what you mean by:

    The infinite scroll should be bigger (double size) How can I increase it?

    and also

    The displayed results (the names of the companies) should not link to the Post-site. They should link to my individual site.

    #188385

    In reply to: Little improvements


    Trevor
    Participant

    The shortcode display results method uses our exemplar template – results.php. The basic steps for customising the file are set here, but you would need to do the coding:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    In the main you would be deleting parts. Are you currently using an unmodified version of that file?

    #188296

    Trevor
    Participant

    To the error; if it only randomly happens, it will be hard to track down, but my first though is that it must be something to do with these settings:

    https://www.screencast.com/t/EoLysM5EqD

    Maybe try changing what they are currently set at?

    Assuming you are using the Shortcode Display Results method:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    If so, I assume you copied the results-infinite-scroll.php template instead of the results.php template when you followed the customising guide there? It still needs to be named results.php in the child theme, so it would need renaming. It looks like this by default:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	<div class='search-filter-results-list'>
    	<?php
    		while ($query->have_posts())
    		{
    			$query->the_post();
    			
    			?>
    			<div class='search-filter-result-item'>
    				<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>
    				
    				<hr />
    			</div>
    			
    			<?php
    		}
    	?>
    	</div>
    <?php
    }
    else
    {
    	?>
    	<div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'>
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    ?>

    On line 29 is this:

    Found <?php echo $query->found_posts; ?> Results<br />

    Simply delete that line and save.

    As to the loading icon, this thread might help:

    https://support.searchandfilter.com/forums/topic/search-filter-scroll-loading-icon-positionning-in-infinite-scroll/

    #188241

    In reply to: Not searching


    Trevor
    Participant

    Ah, OK. You would need to be editing that results.php file to add some of your own code, but I have no suggestions as to what that code might be. I think you know which part needs to be changed, yes?

    #188216

    Anonymous
    Inactive

    Thanks again for directing me in the right way.
    I got it to work how I wanted to:

    http://supernanny.purepixels.nl/onze-au-pairs/

    One more functional question if you don’t mind.

    I have a custom field with date of birth. With PHP I calculate the current age and display it in the results.php.

    I would also like to use a range slider to filter on age, however this field is in the DB as dd-mm-yyyy.

    Do you have any advise how to accomplish this?

    #188204

    In reply to: Raw Search Data


    Anonymous
    Inactive

    Hello Trevor

    Thank you for the prompt reply. I actually already thought of doing what you suggested, but I have not been able to determine the contents of the S&F Pro results array in order to link each item of the query result to the Pod data. Can you tell me how I access the data array for the S&F Pro results?

    As I mentioned in my earlier post, I tried to find raw search data using your instructions at https://searchandfilter.com/documentation/accessing-search-data/ but none of these do anything. They don’t cause any errors, but neither do they echo/print/display the information that they are supposed to. They literally generate nothing on the page. Can you advise how I access the search results data in order to be customise my results.php with additional data from the Pod?

    Thank you for your assistance.

    #188176

    Trevor
    Participant

    Are you able to share with me the contents of the customised results.php file that you are using?

Viewing 10 results - 441 through 450 (of 1,224 total)