-
AuthorSearch Results
-
July 1, 2017 at 10:32 am #118140
In reply to: Visual Results?
TrevorParticipantBTW, this is the grid making results.php I used for your genesis 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> <?php $odd_check = 1; $first_check = 1; while ($query->have_posts()) { $query->the_post(); if ( $odd_check == 1 ) { $odd_class = " odd"; } else { $odd_class = ""; } if ( $first_check == 1 ) { $first_class = " first"; } else { $first_class = ""; } ?> <article class="simple-grid one-third<?php echo $odd_class;?><?php echo $first_class;?> post-<?php echo get_the_ID();?> post type-post status-publish format-standard entry"> <a href="<?php the_permalink(); ?>" class="alignnone"> <?php the_post_thumbnail("small");?> </a> <header class="entry-header"> <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> </header> </article> <?php $odd_check++; if ( $odd_check == 3 ) $odd_check = 1; $first_check++; if ( $first_check == 4 ) $first_check = 1; } ?> <div style="clear: both;"> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?> </div> <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"; } ?>
June 30, 2017 at 5:11 pm #118040In reply to: Remove Categories and Tags from results page
TrevorParticipantHi Sarah, did you follow the customization guide and put a copy of the results.php file in your (child) theme folder?
If you did, you can open that file and edit it. The Categories, Tags and Date parts are all on their own lines, so simply delete each line.
June 29, 2017 at 5:43 pm #117754In reply to: Search & Filter Display Duplicates 1 Entry
TrevorParticipantHi. Great to speak with you Lisa.
You are going to try the page with the standard results.php to see if that works. If it does, then we will know we will need to modify the one you created.
June 28, 2017 at 4:51 pm #117404In reply to: just renewed license
AnonymousInactiveYes I edited the results.php template inside the plugin, templates folder for S&F
June 28, 2017 at 4:37 pm #117385In reply to: just renewed license
TrevorParticipantHi
I can see that you are using the Shortcode Method, and that the page has the results shortcode on it, but the results that show, and the alternate no results method, are not ‘standard’. This makes me think that the results.php template file has been edited, but I do not see this file in the child nor master theme folders?
Did you edit this file? And if you did, did you do so in our plugin’s templates folder?
June 26, 2017 at 12:56 pm #116806In reply to: Change Template
TrevorParticipantAh, I think that I understand. If you are using the Shortcode Display Results method, you need to follow this customisation guide:
And then edit the results.php file.
June 26, 2017 at 12:43 pm #116797In reply to: Visual Results?
TrevorParticipantIs the ‘showmetheyummy’ site yours, or one that you have found?
Does your site use the same theme as them? If not, what theme are you using?
I can see that they use Search & Filter and the Shortcode Display Results method, with a customized results.php file (customized by them, not us).
June 22, 2017 at 3:53 pm #116372In reply to: Pagination in Custom Display results method
TrevorParticipantHi
As you are making your own template, you need to refer to the WordPress Codex for making pagination. In our plugin folder, you will find a folder called templates and in that is a sample results.php template, which shows fairly standard pagination code. A plugin called WP-PageNavi is also a really good example of how to code it.
June 21, 2017 at 5:10 pm #116180In reply to: Results appear only on submit
TrevorParticipantHi
You need to make sure that you have followed the Customization guide here.
Edit the results.php file like this (where 1234 is changed for the actual ID of your form):
global $searchandfilter; $sf_current_query = $searchandfilter->get(1234)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { // any other message here if no search has been made (can be empty) } else { // your results.php code here }
June 20, 2017 at 9:28 pm #115994In reply to: Home page and Results
TrevorParticipantresults.php has basic pagination (as does the default WordPress). To improve this, install the free https://wordpress.org/plugins/wp-pagenavi/ plugin.
-
AuthorSearch Results