-
AuthorSearch Results
-
June 14, 2016 at 2:59 pm #48317
In reply to: No Results Found
TrevorParticipantIt needs to be as per the instructions on this page:
http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
where it says:
Customising the Results
If you wish to customise the display of your results, you must override the default template that is being used by Search & Filter:
Create a folder in your theme folder called search-filter.
Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.phpFrom now on, Search & Filter will load this version of the template instead of its own – so you can make any customisations that are necessary.
June 6, 2016 at 11:38 pm #47646In reply to: Custom Post Type only displaying 1 result
AnonymousInactiveOk I have set the plugin to not use my custom template, and it seems to be pulling the correct results. However, I am not sure what template it is using now. In the /templates folder, editing the results.php does not seem to cause any changes…
May 26, 2016 at 11:21 am #46762In reply to: Upgrade from 1.4.3 to 2.1.2 – No results found
TrevorParticipantOK
I can see that the results are in the format of the results.php template that we provide, which means that you are using the shortcode Display result method? The URL you gave shows 135 results found?
I searched in ‘Class Categories’ for Brahma Samhita and it finds one result.
May 26, 2016 at 10:04 am #46746In reply to: CPT UI & Displaying Results
TrevorParticipantHi Carole
The ACF fields are called Post Meta and so you must drag and drop that to the form builder. In there you will see a checkbox to say it is an ACF field.
Also, when selecting the field you want, make sure the name starts without an underscore.
Styling and the appearance of the results depends on the Display Results Method you choose. ‘As and Archive’ and ‘Post Type Archive’ depend on your theme templates. You may have to edit those templates to add the ACF fields. If you are able (if your theme supports and works with it) to use the Shortcodes display result method, then that uses its own results.php template, and things are a lot more flexible.
May 20, 2016 at 4:42 pm #46181In reply to: Link the Result Image
TrevorParticipantYou appear to be using the shortcode results method, so that is good. Did you make a copy of results.php and place it in a folder called search-filter in your theme folder?
If so, find this code block:
<?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?>
and make it this (I think):
<?php if ( has_post_thumbnail() ) { echo '<a href="' . the_permalink() . '">'; the_post_thumbnail("small"); echo '</a>'; } ?>
May 20, 2016 at 3:13 pm #46150In reply to: Filter on Thrive Theme Builder post grid
TrevorParticipantGot the files. I will post the results.php here for others to use if they wish, with their copy of Ignition and Thrive Visual Builder:
<?php /** * Search & Filter Pro * * Sample Thrive Results Template * * @package Search_Filter * @author Trevor Nelmes * @link http://www.designsandcode.com/ * @copyright 2016 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; ?> Cars<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( 'Previous Page of Cars', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Next Page of Cars' ); ?></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="thrv_wrapper thrv_post_grid" data-unit="px"> <div class="tve_post_grid_wrapper tve_clearfix tve_post_grid_grid"> <div style="display: flex; flex-wrap: wrap;" class="tve_pg_row tve_clearfix"> <?php $thrive_counter = 0; $thrive_row_counter = 0; while ($query->have_posts()) { if ( $thrive_counter == 0 ) && ( $thrive_row_counter > 0 ) { ?> </div> <div style="display: flex; flex-wrap: wrap;" class="tve_pg_row tve_clearfix"> <?php } $query->the_post(); ?> <div class="tve_post tve_post_width_5 " style="align-items: stretch;"> <div class="tve_pg_container"> <?php if ( has_post_thumbnail() ) { $thrive_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'single-post-thumbnail' ); ?> <a href="<?php the_permalink(); ?>"> <div class="tve_post_grid_image_wrapper" style="background-image: url('<?php echo $thrive_image[0]; ?>')"> <div class="tve_pg_img_overlay"> <span class="thrv-icon thrv-icon-forward"></span> </div> </div> </a> <?php } ?> <span class="tve-post-grid-title " style="font-size: 18px;line-height: 20px;font-family:'Arial', 'Helvetica', 'sans-serif';"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </span> <div class="tve_pg_more" data-tve-custom-colour="62938813"> <a href="<?php the_permalink(); ?>">View Now</a> <span class="thrv-icon thrv-icon-uniE602"></span> </div> </div> </div> <?php $thrive_counter++; if ( $thrive_counter > 4 ) { $thrive_counter = 0; $thrive_row_counter++; } } ?> </div> </div> </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( 'Previous Page of Cars', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Next Page of Cars' ); ?></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"; } ?>
Note that this search was for Cars for Sale, so some text strings have been modified to suit (like in the number of results and pagination).
May 18, 2016 at 8:43 pm #45942In reply to: Results not refreshing
AnonymousInactiveHi Trevor,
thanks to your excellent guidance and explanations.
The results.php is working now as intended.
check out: https://www.kleinkunst.theater/Pls note that I have translated some words into german.
(not yet internationalised code, but will add that as well)<?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; ?> Beiträge 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( 'Ältere Beiträge', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Neuere Beiträge' ); ?></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="row row-masonry"> <?php while ($query->have_posts()) { $query->the_post(); ?> <article <?php post_class('post-masonry col-sm-' . $grid_col); ?>> <div class="post-inner"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php echo at_post_thumbnail($post->ID, 'at_thumbnail', $args); ?> </a> <h2> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2> <p><?php echo the_excerpt(); ?></p> <div class="clearfix"></div> </div> </article> <?php } ?> </div> 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( 'Ältere Beiträge', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Neuere Beiträge' ); ?></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"; } ?>
May 18, 2016 at 5:08 pm #45920In reply to: Results not refreshing
TrevorParticipantSo, that was a good Skype session, Frank.
When you have finished what I have started for you customizing the results.php file, maybe you can post it here for others to see?
If you feel that this support has been worthy of note, maybe you could leave a review:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/reviews/
May 18, 2016 at 9:37 am #45835In reply to: Extra lines in search box format
TrevorParticipantAre you still using the shortcode Display Result method? Did you follow the instructions here (about copying the results.php file to your theme folder):
http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
You can then edit that copied file to make the HTML structure as you want.
May 16, 2016 at 9:59 pm #45682In reply to: Results not refreshing
AnonymousInactiveThank you, that would be great.
You need the original index.php template for that?The results.php is copied into my child-theme file.
Regards,
Frank -
AuthorSearch Results