Forums › Forums › Search & Filter Pro › Shortcode or Custom
- This topic has 6 replies, 2 voices, and was last updated 5 years, 4 months ago by
Anonymous.
-
Anonymous(Private) October 4, 2019 at 12:32 pm #222866
Two questions, possibly somewhat related.
1. I’ve followed the instructions for using a shortcode and created a new page which works very well but the layout could obviously do with some improvement. Would you recommend to edit the search-filter page or would I be better off using the Custom display method somehow?
2. I’ve also tried adding a search & filter widget to my Category pages but unfortunately this isn’t working so well and results are not getting shown/updated. If I’ve understood correctly, in this case I DO need to use a custom display method and somehow track down the query that’s being used to generate the page? Unfortunately the theme I’m using seems to calculate this in a function elsewhere so I’m going to have to do some detective work to track it down but would be good just to have it confirmed that I’m thinking along the right lines?
With many thanks in advance.
Trevor(Private) October 4, 2019 at 12:55 pm #222871If you do not want to dig in to the PHP of our results.php file, you could use this method:
https://searchandfilter.com/documentation/3rd-party/post-grid/
Anonymous(Private) October 4, 2019 at 1:01 pm #222873Ah thank you but no I’m fine digging into the PHP so that’s not an issue. I was really just trying to work out when it’s more appropriate to use the shortcode method (using/editing results.php) and when it’s more relevant to use the custom method.
If I’m understanding correctly, they’re really just two slightly different means to a similar end?
Trevor(Private) October 4, 2019 at 1:36 pm #222881The custom method relies on the template (usually a theme template, but can often be a page builder plugin) in use having an argument passed to its wp_query function to use the filters. The shortcode method relies on using the results.php template file and no arguement needs to be passed to it.
-
AuthorPosts