Forums Forums Search & Filter Pro No pagination before using a filter

Tagged: 

Viewing 10 posts - 1 through 10 (of 24 total)
  • Anonymous
    #251430

    Hey guys,

    we have about 50 results in total and 20 per page. The results page shows that there are 3 pages (before applying any filters) which is correct. But you can’t click through them before applying a filter.

    Here’s the link to the website:
    https://hypnoschool.de/therapeutenliste/uebersicht

    Heres ist the code fom my results.php

    
    <?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 this file is called directly, abort.
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	<?php echo $query->found_posts; ?> Ergebnisse gefunden<br />
    	Seite  <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Vorherige Ergebnisse', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Weitere Ergebnisse' ); ?></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 class="therapeut">
    			<p><a href="<?php the_permalink(); ?>"><?php the_field("name"); ?></a></p>
    			
    			<?php 
    				if ( has_post_thumbnail() ) {
    					echo '<p>';
    					the_post_thumbnail("thumbnail");
    					echo '</p>';
    				}
    			?>
    			<p><?php the_field("land"); ?></p>
    			<p><?php the_field("plz_&_stadt"); ?></p>
    			
    		</div>
    		
    		<hr />
    		<?php
    	}
    	?>
    	Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    	
    	<div class="pagination">
    		
    		<div class="nav-previous"><?php next_posts_link( 'Vorherige Ergebnisse', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Weitere Ergebnisse' ); ?></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 "Keine Ergebnisse gefunden";
    }
    ?>
    Trevor
    #251501

    Does this happen if you use the standard results.php template file? If it does, I suspect that you have either code in your theme, or another plugin that is interfering with the standard WordPress pagination (which is what our code uses).

    Anonymous
    #251507

    Yes it does.

    Using the Divi theme.

    I have tried helping myself by looking through the forum but as every other post is market as private I need your help unfortunately.

    Trevor
    #251512

    If you are using Divi, would it help to use our Divi extension (download from the guide page) and the method in this guide:

    https://searchandfilter.com/documentation/3rd-party/divi/

    Anonymous
    #251522

    No, thats not the solution. Yes the theme is Divi BUT

    I’m using ACF and filter pages. No posts, blogs, shops, portfolios, no archive. Just certain pages with ACF.

    And everything is working fine, it’s simply not showing the ‘previous’ and ‘next’ links BEFORE applying a filter.

    Trevor
    #251524
    This reply has been marked as private.
    Anonymous
    #251566
    This reply has been marked as private.
    Trevor
    #251638
    This reply has been marked as private.
    Anonymous
    #251644

    No I can’t deactivate the other plugins, since they keep our live-online courses, which have paying customers in, running.

    I’ve deactivated SmartSlider3, that wasn’t the problem.

    I don’t think that
    – Table of Content
    – Rank Math
    – Menu Icons or
    – Short Pixel
    are the problem here.

    What now?

    Trevor
    #251646
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 24 total)