-
AuthorSearch Results
-
September 14, 2016 at 5:57 pm #57923
Topic: Pagination placement
in forum Search & Filter Pro
AnonymousInactiveIs it possible to load the pagination results
[code]
Found <?php echo $query->found_posts; ?> Resources</br>
Page <?php echo $query->query[‘paged’]; ?> of <?php echo $query->max_num_pages; ?><div class=”pagination” style=”margin: 0px;”>
<div class=”nav-next”><?php previous_posts_link( ‘Previous’ ); ?></div>
<div class=”nav-previous”><?php next_posts_link( ‘Next’, $query->max_num_pages ); ?></div>
[/code]
Outside of the results. Preferably before Because it’s interfering with the grid layout. Or is it better if I just finesse it with css?Here is my sample page.
September 2, 2016 at 2:57 pm #56465In reply to: Extra space in search results
AnonymousInactiveThanks, I fixed that. Your plugin still adds extra paragraph tags and br tags.
<?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"> <div class="photo"> <?php if (get_field('property_main_image') != '') { ?> <img src="<?php the_field('property_main_image'); ?>" alt="<?php get_field('address'); ?>" /> <?php } else { ?> <img src="/CreativeHomes/wp-content/uploads/2016/08/image-placeholder-500x500.jpg" alt="image coming soon" /> <?php } ?> </div> <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" href="<?php echo get_field('map_it_link'); ?>"><img src="/CreativeHomes/wp-content/uploads/2016/08/CH_Button_MapPin_Grey.png" alt="google map for location" /></a> <a target="_blank" href="<?php echo get_field('download_floorplan'); ?>"><img src="/CreativeHomes/wp-content/uploads/2016/08/CH_Button_Collateral_Grey.png" alt="brochure download" /></a> </div><!--end linx--> <a href="<?php echo get_permalink(); ?>"><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 class="clearfix"> </div> </div><!--end interact--> </div><!--end result--> <?php } ?> </div> <?php } else { echo "No Results Found"; } ?>
September 2, 2016 at 1:50 pm #56455In reply to: Extra space in search results
AnonymousInactive<?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"; } ?>
September 1, 2016 at 11:31 am #56333In reply to: Getting started with styling the results template
TrevorParticipantHere 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?
August 24, 2016 at 12:11 pm #55492In reply to: customizing search result style
TrevorParticipantA 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"; } ?>
August 10, 2016 at 1:16 pm #54101In reply to: Customize result.php with table
TrevorParticipantas 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"; } ?>
August 10, 2016 at 12:44 pm #54097In reply to: results.php as a grid
TrevorParticipantThis 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"; } ?>
July 20, 2016 at 5:38 pm #51738In reply to: Shortcode results: don't display results until click
TrevorParticipantHi
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."; } } ?>
July 14, 2016 at 1:50 pm #51150In reply to: Numbered pagination not working when filtered.
AnonymousInactiveHey 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=bathmenFull 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
June 30, 2016 at 7:18 pm #49935In reply to: How to display total number of filtered results?
TrevorParticipantIn theory, in the theme template you have, this php code might do it?
<?php echo $query->found_posts; ?>
-
AuthorSearch Results
-
Search Results
-
Topic: Pagination placement
Is it possible to load the pagination results
[code]
Found <?php echo $query->found_posts; ?> Resources</br>
Page <?php echo $query->query[‘paged’]; ?> of <?php echo $query->max_num_pages; ?><div class=”pagination” style=”margin: 0px;”>
<div class=”nav-next”><?php previous_posts_link( ‘Previous’ ); ?></div>
<div class=”nav-previous”><?php next_posts_link( ‘Next’, $query->max_num_pages ); ?></div>
[/code]
Outside of the results. Preferably before Because it’s interfering with the grid layout. Or is it better if I just finesse it with css?Here is my sample page.