AnonymousInactive
Good afternoon,
I wanted to alter the output of results.php for a site I am building. Your instructions suggest creating an alternate results.php template in my child theme, which would normally be fairly straightforward. However, the child theme in question here is running in a total of 50 different places and I only want to make this modification on one of those properties.
Is it possible to locate the new results.php file in a different location (like a separate plugin) and have it still be available to your product?
Thanks!
Are you using the Shortcode Display Results Method? If so, start with this guide (if you have not already):
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
Having gotten the copy into your child theme sub folder, install the free WP-PageNavi plugin:
https://wordpress.org/plugins/wp-pagenavi/
If that gives you what you want, you would then need to edit that results.php file to remove the parts of the HTML/PHP that you no longer need.
Are you using the Shortcode Display Results Method? If so, start with this guide (if you have not already):
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
Having gotten the copy into your child theme sub folder, install the free WP-PageNavi plugin:
https://wordpress.org/plugins/wp-pagenavi/
If that gives you what you want, you would then need to edit that results.php file to remove the parts of the HTML/PHP that you no longer need.
If you haven’t already done so, can you follow this guide:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
In particular, follow the instructions in the Customising section.
That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.
Then, see the guidance in this post:
https://support.searchandfilter.com/forums/topic/ajax-not-working-submit-button-also-gone/page/2/#post-134962
To 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.
AnonymousInactive
I’m using Oxygen site builder which doesn’t use WP’s traditional theming system. So I can’t use child theme to customise my search results. Right now I’m using the core template file (wp-content/plugins/search-filter-pro/templates/results.php) to make changes but it seems I’m not able to customise separate forms: I can’t target the forms via their ID (wp-content/plugins/search-filter-pro/templates/myID.php won’t work).
Considering my situation, is it possible to keep my customisations after plugin update (results.php will be probably overwritten?) and how can I target separate search forms? In Oxygen, there is possibility to add custom PHP either via post specific code block or plugin.
As that function (the_posts_pagination()) is calling external (to the results.php template) code, the chances are that it is not initialised when our template is being used. You would (most likely) need to find the actual code being run by that function and bring it inside the results.php template to run there.
AnonymousInactive
I’ve created a search & filter for posts using a shortcode to display results but the pagination isn’t working: https://nwhn.blackbaudwp.com/search-filter-test-1/
Notes:
- I’ve setup a custom results.php file in my WP child theme folder that is using <?php the_posts_pagination(); ?> to add numbered pagination.
- Here are screenshots of my search & filter display results setup, WP child theme files and results.php file: https://drive.google.com/drive/folders/1ol0RgTTJayHuG0TDgDR9eUBwfZU1qwH1?usp=sharing
- I’m using the beaver builder plugin to add the shortcode to my page (ICYW – I cannot add the Search & Filter – Beaver Builder Extension plugin due pluggin activation restrictions from my hosting team)
Thanks for your help!
Hi
Our results.php file does not change for any version of 2.x of our Pro plugin. We do that because customers edit and make their own custom versions, so we have made it so we do not break that.
The current version is tested to work OK with the current version of WordPress, and also works fine with 5.5. When/if we release v2.5.2, it will say compatible with WordPress 5.5.
We may release this shortly after WordPress 5.5 ships (so we have a few days to test with the final release version of WP5.5).
We will use language files in the next major release of our plugin, V3, which is due in a few months.
AnonymousInactive
The cooperation with Divi is very good.
The horizontal display of the form only works with the free version, but not with the pro-version. Therefore I have now changed the whole design:
https://www.veggie-treff.de/vegane-rezepte/
Missing language files are not good in the long run. Especially with a paid version this should be standard.
A copy for individual editing of “results.php” is nice, but also dangerous. So I have to check after each update if I have to make adjustments.
Scary is the old version (3 months) and only tested until WordPress 4.9.
When can I expect a current Pro version, which is at least tested with WordPress 5.4.2 and 5.5?