AnonymousInactive
Hey Ross!
Not yet: I want to display the results using a shortcode, but I’ve got a problem with the custom template, that I built on the base of your ‘results.php’. As you can see on http://hofer-filmtage.com/testarchiv-b/ – it’s loading the portfolio items in a strange way. My part of the code displays the page-URL instead of the portfolio-item.
So I tested the results using an archive with the code above, which comes with the ENFOLD theme. That worked.
Back to the results using a shortcode: For the moment, I don’t know how to customize my template. I think, that the code above is a good basis for it. So would you please have a look on it?
Thanks a lot
Bernd
AnonymousInactive
Hi Ross!
Please forget the last two questions – I’ve got it.
Now the search-form displays the results using a shortcode. But I’ve got a problem with the custom template, that I built on the base of your ‘results.php’. As you can see, it’s not loading the portfolio items, but something with the name of the results-page: http://hofer-filmtage.com/testarchiv-b/
Do you have an idea?
Thanks, Bernd
AnonymousInactive
I’ve resolved the issue by adjusting CSS of results.php : it was calling some function of the theme to define CSS classes, and I think it was not working when ajaxed.
However I DO have a pb of JS : as below, on page load, no pb : some JS is called and create a nice masonry grid.
But when ajaxing the results, the grid is not looking good. I’ve checked console, but I don’t know what to look at.. One thing is true : when I disable JS, the load page has the same mess, so definitely some JS is not loading in ajax results.
Any idea ? 😀
AnonymousInactive
Thanks, I’m using the shortcode method and have removed the query but it’s telling me there are no results.
I set up a new results.php within a search-filter folder as the docs said and added my custom post type fields and markup inside the loop but it’s not finding them.
AnonymousInactive
This needs to be nothing less than completely overwritable, either using hooks or a template override file.
I’ve made a custom layout by modifying results.php, and will have to modify this plugin in several other places to achieve what I need. It’s still the best one available, but in general I think all plugins need to allow for people to completely override and change their layouts – this is what will make them usable in more scenarios.
AnonymousInactive
Yep, it’s actually pretty easy to do also……
Create a folder IN your WP Theme folder and name it /search-filter
Then start with any template (e.g. results.php) and name it for the search filter you’ve created. For example, in your search and filter shortcode, it gives you a form ID, such as “102”, so name your template page “102.php” and put it in that new folder and upload it.
S&P will use your new template file to display your results.
AnonymousInactive
I want to customize the results.php file and keep it safe from updates… so, it’s possible to use some kind of “child theme” or something similar?
In fact would be GREAAAAT to have options to customize the results trough plugin options screen/back-end in the next updates.
Anyway… how I create a “child theme” for Search & Filter PRO?
Thanks! 😀
AnonymousInactive
So I have a form with a bunch of taxonomy checkboxes, a dropdown and an open search box. I want to give people the option to search or filter their results. All of the filters work as they should. The search box is supposed to let people search the post type by keywords (in custom fields) as well as by the post title. When you search by post title the search box works as expected. When you try to search by a word (that I know is in one of the custom fields for the post) the search returns no results. I’ve tried setting up a regular search box and seem to get the results without a problem that way.
I am using Ajax to display the results as well as a custom results.php file (in the child-theme folder). I’m also using the Search Everything plugin to modify the search to include metadata and taxonomies. Do you know why the search box doesn’t return any results (when i know that there are results with the specific keyword)?
Thanks for your help
It sounds fine, if its not working then I’d double check whether your ID is definitely correct.
This is how I have my results.php setup and was working fine:
https://www.designsandcode.com/wp-content/uploads/2015/03/results.zip
Although this was just for testing, I think the function should go in functions.php of your theme.
*EDIT* – after thought – if we are loading results via wp-admin/admin-ajax.php
– then maybe this doesn’t load your theme, and therefor not the function either – I’m not sure on this haven’t had time to test.
Either way, I’ll be integrating some functions in to the plugin at some point that will handle all this automatically.
Thanks
Ah I see
You will find that with the shortcode method, it is creating a custom loop – which doesn’t work out of the box with most pagination, normally there are one or two additional steps to make pagination work with custom queries, but this depends on how you are implementing this.
The sample results.php
template has the code in it for the wp_page_navi
plugin so if its enabled it should just display.
Thanks