-
AuthorSearch Results
-
May 11, 2020 at 8:42 am #243260
In reply to: styling search results
TrevorParticipantComparing the two forms is not easy, as you have dropdown selects in one and checkboxes in the other?
I DO see an issue with the infinite scroll that needs fixing, where it shows No Results at the bottom. This is a modified version of the standard infinite scroll results.php file to stop it from happening:
<?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 /> <div class='search-filter-results-list'> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class='search-filter-result-item'> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p><br /><?php the_excerpt(); ?></p> <?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?> <p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p> <hr /> </div> <?php } ?> </div> <?php } else { //figure out which type of "no results" message to show $message = "noresults"; if(isset($query->query['paged'])) { if($query->query['paged']>1){ $message = "endofresults"; } } if($message=="noresults") { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>No Results Found</span> </div> <?php } else { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } } ?>
As for the styling, might you be able to show me an annotated (naming colors, font family, weight, size) screenshot of the frontend form and what needs changing? You would need to upload the screenshot image to a file sharing site (like the WordPress Cloudup site) and share the link for it with me?
May 4, 2020 at 11:23 am #242463In reply to: Category marked by default in the category dropdown
TrevorParticipantOur results.php exemplar template is setup so that, if you install this free plugin:
https://wordpress.org/plugins/wp-pagenavi/
Our template will then use the settings in that plugin, and that will give you the options you need.
April 30, 2020 at 4:52 pm #242227Topic: Customize search results template
in forum Search & Filter Pro
AnonymousInactiveHello!
I would like to change the results.php file, so I uploaded it to my child theme folder:
/wp-content/themes/dt-the7-child/search-filter-pro/templatesSadly this didn’t do anything to the search results output.
Could you tell me where to change the file?Greetings
April 30, 2020 at 3:07 pm #242211
TrevorParticipantI understand. IF all you wanted was to make a new search (and not retain the current search), then you would need to edit the code in the results.php code using our guide to customising and make the link something like this:
http://mysite.com/my_search_page/?_sft_category=my_category_slug
April 30, 2020 at 12:20 pm #242133In reply to: multi select not working and posts in single column
TrevorParticipantTo modify the output of the results.php template file (I have done this for myself on projects, and even some using Avada), I have examined the output HTML on a sample page and reverse engineered that into a combination of HTML and PHP for a custom template. For Avada, it used to typically take 4-8 hours to do though.
An alternative solution (and what I now do if I am having to use Avada) is to use a plugin that works in a similar way to our shortcode method:
https://searchandfilter.com/documentation/3rd-party/post-grid/
In the Post Grid plugin, you determine the number of columns by using the post width setting.
April 30, 2020 at 10:38 am #242089In reply to: Can I use Search & Filter Pro to do this?
TrevorParticipantThe URL/page you gave loads as 404 not found for me? Is it available to a logged in admin?
In the field design, there is an option to change the ‘Search Operator’ from the default
AND
toOR
. You need to make that change.You might use the Shortcode method:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
And follow the guide on customising (edit the code in your copy of the results.php file) so that it shows only plain text, and no links.
April 29, 2020 at 10:59 am #241917In reply to: Advanced custom field, can’t find posts
TrevorParticipantThe display of the results is dependent on the Display Results method. You are suing the Shortcode method, which in turn uses our exemplar results.php template. This is only a basic template, and you would have to customize it yourself to change the layout. Some users are OK with this, some are not. Sometimes, it is made easy by your theme, by taking code from an existing theme template.
The normal category page, how is that built? Does it use a visual builder or theme options, or does the page use a theme template coded to two columns?
Are you expecting to use this search on other pages? I ask because the Shortcode display results method works only on a single page.
April 29, 2020 at 10:18 am #241892In reply to: multi select not working and posts in single column
TrevorParticipantAuto Submit is shown here:
https://www.screencast.com/t/ieXM1PyBwrY
I have shown it switched off.
What do you want to change about the appearance/layout/content of the results? Remember, what you see is because the template being used, results.php, is somewhat basic, but deliberately so to allow the site owner to customize it. Do you have a page elsewhere in your site that has the appearance you want?
April 28, 2020 at 11:50 am #241741In reply to: Link in images
TrevorParticipantas you are using the shortcode display results method, and you appear to have already customised the results.php template file (I hope by placing that modified version in a
search-filter
sub folder of your child theme folder), this post may be able to show you how to change our standard code to make the image into a link:https://support.searchandfilter.com/forums/topic/only-title-search/#post-227954
April 27, 2020 at 4:35 pm #241565In reply to: Translations not available.
TrevorParticipantresults.php will not change, but I understand.
-
AuthorSearch Results
-
Search Results
-
Hello!
I would like to change the results.php file, so I uploaded it to my child theme folder:
/wp-content/themes/dt-the7-child/search-filter-pro/templatesSadly this didn’t do anything to the search results output.
Could you tell me where to change the file?Greetings