Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 1,081 through 1,090 (of 1,224 total)
  • Author
    Search Results
  • #29244

    Ross
    Keymaster

    Hi Tim

    I see the issue.

    Because your templates are based on an old version of S&F, your template is calling a function which no longer exists in S&F – and causing this error.

    You need to update your templates to use regular WordPress pagination instead:

    https://support.searchandfilter.com/forums/topic/auto-cache-rebuild-caching-issue/#post-29048

    Ohhh I see, you are using pagination from a very old version of S&F.

    I’ve since removed the custom S&F pagination in favour of using WP standards.

    So now for pagination check the updated results.php template located at search-filter-pro/templates/results.php for example usage of pagination.

    This also means there is out of the box support for the wp-pagenavi plugin which allows you to do even more cool things 🙂

    https://wordpress.org/plugins/wp-pagenavi/

    Thanks

    #29048

    Ross
    Keymaster

    Ohhh I see, you are using pagination from a very old version of S&F.

    I’ve since removed the custom S&F pagination in favour of using WP standards.

    So now for pagination check the updated results.php template located at search-filter-pro/templates/results.php for example usage of pagination.

    This also means there is out of the box support for the wp-pagenavi plugin which allows you to do even more cool things 🙂

    https://wordpress.org/plugins/wp-pagenavi/

    Thanks

    #28866

    Ross
    Keymaster

    Hey Philip

    Sorry for the delay on this.

    Did you manage to get it resolved?

    It is quite an odd bug, because the default results.php file includes the_date() by default, and I’m sure someone else would have mentioned it by now.

    I just took a look at your link above, and I do see a date formatted 28/10/2015 but not sure if this is the same date we function we’re talking about.

    Thanks

    #28864

    Ross
    Keymaster

    You can customise the results.php using the info here:

    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    However, to implement a specific design/layout is beyond the scope of support here.

    Thanks

    #28685

    Anonymous
    Inactive

    Hello,

    After upgrading s&f to 2.0.2 filtering is not working anymore on certain pages.
    Im getting error message “No Results Found”

    Filtering at bottom of the page not working (en version):
    http://www.combinent.com/slip-rings/

    Filtering is working fine on finnish version of the page:
    http://www.combinent.com/liukurenkaat/?lang=fi

    Theme is using default results.php template

    Any ideas?
    – Jussi

    #28577

    Anonymous
    Inactive

    Hi Ross

    Thanks for getting back to me. Actually I probably didn’t explain myself very well. All I wanted to do was return the results of some simple custom fields in the search results, which I have managed to do in my own clumsy hacking way, by using the get_field for ACF, which works great for me. But I’m having a strange issue with the search results, the post date, which I think is a standard result you would expect to see from your standard results.php template and which I have left in my ‘updated’ version is not automatically showing up – it’s really strange. If I set the CPT published date to something random like two weeks previous it shows in the results, but if I just create a new CPT it just doesn’t show up at all.

    I wonder if you have come across this issue before – I realise I should really start a new thread, and I will if there’s not a straight forward answer.

    Anyway this is my code for returning the Custom Fields with the post_date towards the end:

    while ($query->have_posts())
    {
    $query->the_post();

    ?>
    <div class=”searchresult”>

    <h2>“><?php the_title(); ?></h2>
    <?php $field = get_field(“location”, $post_id, $format_value);
    $value = get_field( “company” );

    if( $value ) {

    echo ‘<div class=”resultcompany”>’;
    echo ‘<h4 class=”resulttitle”>’ . “company” . ‘: </h3>’;
    echo ‘<h4 class=”resultvalue”> ‘ . $value . ‘</h3>’;
    echo ‘</div>’;
    }

    $field = get_field(“deadline”, $post_id, $format_value);
    $value = get_field( “location” );

    if( $value ) {

    echo ‘<div class=”resultlocation”>’;
    echo ‘<h4 class=”resulttitle”>’ . “location” . ‘: </h3>’;
    echo ‘<h4 class=”resultvalue”> ‘ . $value . ‘</h3>’;
    echo ‘</div>’;
    }

    $field = get_field(“deadline”, $post_id, $format_value);
    $value = get_field( “deadline” );

    if( $value ) {

    echo ‘<div class=”resultdeadline”>’;
    echo ‘<h4 class=”resulttitle”>’ . “deadline” . ‘: </h3>’;
    echo ‘<h4 class=”resultvalue”> ‘ . $value . ‘</h3>’;
    echo ‘</div>’;
    }
    ?>

    <p class=”resultpostdate”>Vacancy Posted: <?php the_date(); ?></p>

    </div>

    <?php
    }
    ?>

    Thanks in advance Ross!

    #28337

    Ross
    Keymaster

    Just emailed you an update.

    If using in results.php you should use:

    echo $query['search_filter_id'];

    Thanks

    #28106

    Ross
    Keymaster

    Hey Rakesh

    S&F doesn’t come with different layouts – it comes with the results.php if you are using shortcode method, or you can use a layout in your theme.

    To build a new layout, you must also know how to build a new layout in WordPress – if you can do it in normal WP, you can do it here with S&F.

    So really, this customisation is specific to your project – however there are some resource I’ve dug out before:

    https://support.searchandfilter.com/forums/topic/search-results-as-grid/#post-24882

    Hope that helps!

    Thanks

    #28060

    Anonymous
    Inactive

    Hi,

    How can I modify this code so that I have 3 columns showing up instead of 1?

    <?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 />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	
    	<?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
    	}
    	?>
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #28047

    Anonymous
    Inactive

    Hi,

    I followed the steps on Customizing The Results Page but I am not sure what to do after. I copied the results.php file into the new folder but I am not sure how to customize the template for it. I use beaver builder on my website but no idea how to create a template for the results.php file. I am trying to create the results page with grid for my posts.

Viewing 10 results - 1,081 through 1,090 (of 1,224 total)