Search Results for 'found_posts'

Forums › Forums › Search › Search Results for 'found_posts'

Viewing 10 results – 171 through 180 (of 205 total)
  • Author
    Search Results
  • #56455

    Anonymous
    Inactive
    <?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 style="width:100%;">
    
    	
                
                   		<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    	<div class="result">
    	
    		<?php if (get_field('property_main_image') != '') { ?>                     
             <img />" alt="" width="400px" />   
                       <div class="status"><?php echo get_field('status'); ?></div>
                       <div class="details">
                        
                           <?php
                           
                            echo '<h4>$' .  get_field('price') . ' </h4>';                           
                                                    
                            
    						echo '<p>' . get_field('address') . '<br>';
    						echo get_field('city') . ', '; echo get_field('state'); echo get_field('zip') . '</p>';   
    
    						echo '<p class="spex">' .  get_field('bedrooms') . ' BEDROOMS | '; echo get_field('bathrooms') . ' BATHROOMS<br>';
    	
    						echo '<span class="secondline">' .  get_field('square_footage') . ' SQ FT | '; echo get_field('garages') . ' CAR GARAGE</span>';
    
    	
    						echo '<span>MLS# ' .  get_field('MLS') . '</span></p>';?>
      					
      						
      					
      						<div class="linx">	
      							
      							<a href="#"><img src="/CreativeHomes/wp-content/uploads/2016/08/CH_Button_Photos_Grey.png" alt="see photo gallery" /></a> 
      							<a target="_blank">"><img src="/CreativeHomes/wp-content/uploads/2016/08/CH_Button_MapPin_Grey.png" alt="google map for location" /></a> 
      							<a target="_blank">"><img src="/CreativeHomes/wp-content/uploads/2016/08/CH_Button_Collateral_Grey.png" alt="brochure download" /></a>
      						</div><!--end linx-->
      					
      						<a>"><img src="/CreativeHomes/wp-content/uploads/2016/08/details-button.png" width="122" alt="details" /></a>
    
      					</div><!--end details-->
      	  							
      	
      				<div class="interact">
      					<span><?php the_favorites_button($post_id, $site_id); ?></span>
      					<span><img src="/CreativeHomes/wp-content/uploads/2016/08/check-icon.jpg" />Compare</span>
      					<span><?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>Share</span>
    
      				</div><!--end interact-->  
      				                     
    			</div><!--end result-->
    
    		<?php
    	}
    	?>	
    	</div>				
    	
    	
    	
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #56333

    Trevor
    Participant

    Here is the ‘starter’ results.php for your Thrive theme:

    <?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>
     <div class="scbgi tt-search-results-posts-container" id="tt-search-results-container">	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div class="scc left">
    			<?php
    				if ( has_post_thumbnail() ) { ?>
    					<a class="rmich" href="<?php the_permalink(); ?>">
    						 <div class="rimc" style="background-image: url('
    						<?php the_post_thumbnail_url("small");?>
    							')"></div>
    			  </a>
    			<?php	} ?>
    
    			<div class="scbt">
    				 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    			
    		 	 <p><br /><?php the_excerpt(); ?></p>
    			  <p><?php the_category(); ?></p>
    			  <p><?php the_tags(); ?></p>
    			  <p><small><?php the_date(); ?></small></p>
    			</div>
    			
    		</div>
    
    		<?php
    	}
    	?>
     </div>
    	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";
    }
    ?>

    Let me know how you get on and if I can close the thread?

    #55492

    Trevor
    Participant

    A customized results.php for you:

    <?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>
    <ul class="penci-grid">
    
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
      <li class="list-post">
        <article id="post-3238" class="item">
          <div class="thumbnail">
    			<?php 
    				if ( has_post_thumbnail() ) {
    					echo '<p>';
    					the_post_thumbnail("thumb");
    					echo '</p>';
    				}
    			?>
    					</div>			
          <div class="content-list-right content-list-center">
            <div class="header-list-style">
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    							</div>			
            <div class="item-content">
    									<p><br /><?php the_excerpt(); ?></p>
    							</div>
    					</div>
        </article>
      </li>
    		
    		<?php
    	}
    	?>
    </ul>
    	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";
    }
    ?>
    #55304

    Anonymous
    Inactive

    TL;DR (but please read): custom taxonomy values are not being pulled from the post, except for sometimes.

    I have a Custom Post Type: vehicles. I created two custom taxonomies just for that CPT: vehicle_make and vehicle_model. These were done use the CPT UI plugin. There are various other ACF fields as well.

    The search form is setup like so:
    Make | Model | Year | Location | Reset

    You can see the dev version here:
    http://tap.voltaic.xyz/inventory/

    I’m displaying the results using a custom template (600.php):

    <?php if ( $query->have_posts() )
    {
    	?>
    	
    	<div class="inv_container">
    		<p class="inv_count">Found <?php echo $query->found_posts; ?> Vehicles</p>
    		<p class="inv_note">You can bookmark and share these results.</p>
    
    		<div class="inv_header clear">
    			<div class="inv_make">Make</div>
    			<div class="inv_model">Model</div>
    			<div class="inv_year">Year</div>
    			<div class="inv_location">Location</div>
    			<div class="inv_row">Row</div>
    		</div>
    		<?php while ($query->have_posts()) { $query->the_post(); ?>
    			<?php 
    			$classes = array();
    			$classes[] = "inv_item";
    			$classes[] = "clear";
    			?>
    
    			<article <?php post_class($classes); ?> >
    				<div class="inv_make"><?php echo get_field('v_make')->name; ?></div>
    				<div class="inv_model"><?php echo get_field('v_model')->name; ?></div>
    				<div class="inv_year"><?php the_field('year'); ?></div>
    				<div class="inv_location"><?php the_field('city'); ?></div>
    				<div class="inv_row"><?php the_field('row'); ?></div>
    			</article>
    
    		<?php }	?>
    	</div>
    
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>

    When you visit the dev site you’ll see that I’m receiving a PHP error because the custom taxonomy values are not being pulled from the post. However, if you look at this custom search you’ll notice that one of the results is showing as intended:
    http://tap.voltaic.xyz/inventory/?_sft_vehicle_make=honda&_sft_vehicle_model=civic&_sfm_year=1999

    I added about 1800 posts to this CPT using WP Ultimate CSV Importer. When I edit one of these posts, from the import, the custom taxonomies show up on the edit screen, selected as they are expected to be (I also imported a sampling of posts using another CSV importer and it had the same results). Now, here’s the interesting part, if I update one of the posts, from the import, it will show up as expected in the results (I just edit the post and immediately click Update, nothing else). The Honda Civic from that custom search is one such post that was updated after the fact. You can imagine that I’m not keen on updating 1800 posts one at a time. Not to mention, I shouldn’t have to.

    I installed a different search/filter plugin (Filter Custom Fields & Taxonomies Light) and it displayed results correctly. Though, I don’t like that plugin for its UX and various other reasons. It doesn’t have any problem pulling the custom taxonomy value from the post. You can see those results pulling from the same CPT here:
    http://tap.voltaic.xyz/test-search/

    I really need a resolution for this issue. I’ve spent at least 8 hours trying various things to resolve it. Please help.

    #54101

    Trevor
    Participant

    as I haven’t heard back from you I hope all is OK? This results.php below works in Divi. The user wanted the results in a column that was 75% of the page width, the search form was in a sidebar in the other 25%.

    The pavigation and post titles are full width, and the content is thumb to the left and excerpt to the right, taking up 1/3 and 2/3 of the 75% column width:

    <?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() )
    {
    	?>
    	<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	   <?php echo $query->found_posts; ?> gefundene Ergebnisse<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( 'Seite zurück', $query->max_num_pages ); ?></div>
    		    <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	   </div>
       </div>
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    		<div>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
          <div class="et_pb_row_inner et_pb_row_1-4_1-2">
            <div class="et_pb_column et_pb_column_1_4 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          <?php
            if ( has_post_thumbnail() ) {
              echo '<a href="';
              the_permalink();
              echo '">';
              the_post_thumbnail("small");
              echo '</a>';
            }
          ?>
              </div>
            </div>
            <div class="et_pb_column et_pb_column_1_2 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          			<p><br /><?php the_excerpt(); ?><p>
    			      <p><?php the_category(); ?></p>
    			      <p><?php the_tags(); ?></p>
    			      <p><small><?php the_date(); ?></small></p>
              </div>
            </div>
          </div>
    
    		</div>
    
    		<hr />
    		<?php
    	}
    	?>
      <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	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( 'Seite zurück', $query->max_num_pages ); ?></div>
    		  <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	  </div>
      </div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #54097

    In reply to: results.php as a grid


    Trevor
    Participant

    This was the results.php modified to work with the Newspaper 7 theme (by TagDiv):

    <?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() )
    {
    	?>
    
    	Es wurden <?php echo $query->found_posts; ?> Wetsuits 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( '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
      $td_count = 0;
    	while ($query->have_posts())
    	{
    		$query->the_post();
    if ( $td_count == 0 ) { ?>
      <div class="td-block-row">
    <?php } ?>
    		<div class="td-block-span6">
          <div class="td_module_1 td_module_wrap td-animation-stack">
    
          <?php if ( has_post_thumbnail() ) { ?>
            <div class="td-module-image">
              <div class="td-module-thumb">
                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    					<?php the_post_thumbnail("thumb");?>
    					</a>
            </div>
          </div>
    			<?php	} ?>
    
          <h3 class="entry-title td-module-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    
    		  </div>
        </div>
    <?php
    $td_count = $td_count + 1;
    if ( $td_count > 1 ) $td_count = 0;
    if ( $td_count == 0 ) { ?>
      </div>
    <?php }
    	}
      if ( $td_count == 1 ) { ?>
        hello</div>
    <?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";
    }
    ?>
    #53355

    Anonymous
    Inactive

    Hey trevor,

    I want to customize the result.php to get another look on the search results.
    I just want have a table wich sets the document picture to the left an the text of the document to the right.
    Header and Site forward and Resultcount can stay like that.

    Could you help me out?
    Site: http://versicherungsbedingungen-online.de/suchseite/
    Here´s the code:

    <?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() )
    {
    	?>
    	
    	<?php echo $query->found_posts; ?> gefundene Ergebnisse<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( 'Seite zurück', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></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 '<a href="';
        the_permalink();
        echo '">';
        the_post_thumbnail("small");
        echo '</a>';
      }
    ?>
    			<p><?php the_category(); ?><p>
    			<p><?php the_tags(); ?><p>
    			<p><small><?php the_date(); ?></small><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( 'Seite zurück', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></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";
    }
    ?>
    #51738

    Trevor
    Participant

    Hi

    I found two errors (one was ours, one yours), so here is the fixed code (I do not know if this will work):

    <?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() ) {
        global $searchandfilter;
        $sf_current_query = $searchandfilter->get(44)->current_query();
        if ($sf_current_query->is_filtered()) {
            ?>
    
            <?php echo $query->found_posts; ?> Firm(s) Meet All Selected Criteria<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>
                    <h6><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h6>
    
                    <p><?php the_tags(); ?></p>
    
                </div>
    
                <hr/>
                <?php
            }
            ?>
    
            <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 firms meet all of your criteria. Try unchecking some boxes.";
        }
    }
    ?>
    #51150

    Anonymous
    Inactive

    Hey Trevor,

    I changed the format.

    I do have a URL: http://wederopbouwvansalland.nl/boerderijen/lijst/

    Gemeente is a filter.

    Filters work fine on: http://wederopbouwvansalland.nl/boerderijen/lijst/
    But not on: http://wederopbouwvansalland.nl/boerderijen/lijst/?_sft_gemeente=bathmen

    Full code:

    <div id="filters-placeholder">
    				<div id="filters-container">
    					<div id="filters">
    
    						<h6>Filters</h6>
    						
    						<?php echo do_shortcode( '[searchandfilter id="116"]' ); ?>
    
    					</div>
    				</div>
    			</div>
    			
    			<div id="page-content">
    
    				<div class="boerderij-list">
    
    				<?php
    
    					// Using parameters of S&F Pro plugin
    					$args = array( 'search_filter_id' => 116 );
    
    					query_posts( $args );
    
    					while ( have_posts() ) : the_post(); 
    
    						get_template_part( 'partials/post-boerderij' );
    
    					endwhile; 
    
    					$num = $wp_query->found_posts;
    
    					if ($num == 1) {
    						echo '<span id="num-hidden">' . $num . ' boerderij</span>';
    					} else {
    						echo '<span id="num-hidden">' . $num . ' boerderijen</span>';
    					}
    				?>
    
    				<!-- <div class="pagination">
    					<?php next_posts_link( "Volgende" ); ?>
    					<?php previous_posts_link( "Vorige" ); ?>
    				</div> -->
    
    				<?php
    global $wp_query;
    
    $big = 999999999; // need an unlikely integer
    
    echo paginate_links( array(
    	'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    	'format' => '?sf_paged=%#%',
    	'current' => max( 1, get_query_var('paged') ),
    	'total' => $wp_query->max_num_pages
    ) );
    ?>
    
    				</div><!-- .boerderij-lijst -->

    Kris

    #49935

    Trevor
    Participant

    In theory, in the theme template you have, this php code might do it?

    <?php echo $query->found_posts; ?>
    
Viewing 10 results – 171 through 180 (of 205 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.