Hey Pawel
I had a quick look.
Ok, so when you don’t use ajax, pagination should always show real links, not with a #
– try using the code from the example results.php
again for your pagination – I have seen no problems with this under other environments.
Also, I noticed, you have JS errors on your page – which could cause issues with this and other plugins – even if you don’t use ajax, S&F still uses JS so its important to fix all these in case of any problems.
Thanks
AnonymousInactive
Hi Bob,
Yes, that’s definitely possible, it just requires a couple of steps.
There are some good instructions in the documentation, here:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/display-results/with-a-shortcode/
1. First you create a new template for displaying your search results (you can start with the default results.php as a foundation if you like, and customize it however you want – that file is found in the plugin’s Templates folder). Your NEW template file should be named with the ID number of your filter form (e.g. my filter form is ID 102, so my template is 102.php), and placed in a NEW folder that you’ll create in your THEME folder, name the folder ‘search-filter’ – the plugin will look in this new folder first for templates.
2. This template file just handles displaying the form and the results, so you’ll also need to place the SHORTCODE that calls this template into the PAGE template, and change the METHOD for displaying the results in the Settings for the form/filter to “shortcode” (instead of “archive”).
SO let’s say you have a PAGE on your site for products, with some content at the top of the page maybe, and your product list (and filters) below. ON that Page paste your shortcode for displaying the form and results, which you can copy from the Filter’s settings….for example, I use:
[searchandfilter id=”102″ show=”results”]
Read the documentation linked to above, hopefully it will make sense, if not ask more questions and I’ll try to help. 🙂
Please can you also put the results.php code into something like pastebin, I will check this first for any issues before logging in.
Thanks
Hi there
That is very strange, would you be able to supply some logins details so I can take a look?
Can you also supply the code of “results.php” in something like http://pastebin.com/
Thanks
AnonymousInactive
SO if I understand correctly, you DO want the “reset” button to show on the results page?
Probably the best solution is to copy the default “results.php” to a new template. Name the template with the ID of your form (eg. if your form has the ID of 215, your new template would be named 215.php)
Put this file in a sub-folder of your Theme, named search-filter. This is where the plugin will look for custom search results template files.
Then in your new template, surround the results with a DIV that has a class that you can style however you want, and you can target that button in that style.
Lastly, use the Shortcode method, and insert the shortcode into the Page Template where you want results to show….enter that Page into the box shown when you select “shortcode” in the plugin settings under Display Results.
In my case, I have the form and results on a custom page template I created, and I have a Page that uses that Template.
In that custom page template, I put the shortcode where I want it (there is other content above and below my search results and form)….e.g. echo do_shortcode(‘[searchandfilter id=”102″ show=”results”]’); (surrounded by the PHP open/close tags, which I don’t think will show here).
In the settings for my form, I select “use shortcode” and enter my Page (URL) in the box (e.g. “http://www.mysite.com/myPage/”).
I hope this helps – by customizing the page on which your form and results display, you have more opportunity to declare your own style selectors, and then style things however you like.
AnonymousInactive
Hey Ross,
I have managed to do it. I have copied the results.php file to theme folder and customised it with the look and sections i want. Now its working fine. Not sure what was the issue with custom template. Strange.
Anyway thanks for your help and time. Appreciate it!
AnonymousInactive
I have other problem. I’m designing the file the results.php but it doesn’t run older posts and new, this show No Results Found and i don’t know why
this is the code that doesn’t run
<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>
…
AnonymousInactive
Can I have multiple results.php templates for different forms? I’ve tried, but it doesn’t seem to let me do this?
For example, I have a client search and want to use for 2 separate forms:
/wp-content/themes/my-theme/search-filter/results-client.php
/wp-content/themes/my-theme/search-filter/results-events.php
Hey Stefania
If you wish to use a regular page template for displaying results (like archive-product.php
you mention above) then use must use the archive method.
If you are using the shortcode method, and know some html/css, then you can copy the html structure and use it in results.php…
For woocommerce styling, and the correct CSS to be applied, please view the source of the page when on product archives and you will notice woocommerce is adding some classes to the <body>
tags for layout purposes – you need to copy the same classes over using the method described here:
https://support.searchandfilter.com/forums/topic/wp-4-2-1-update-affecting-plugin/page/2/#post-17059
Thanks