Forums Forums Search & Filter Pro Shortcode or Custom

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #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
    #222871

    If 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
    #222873

    Ah 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
    #222881

    The 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.

    Anonymous
    #222922

    Thank you. I like to understand how/why things work and that makes perfect sense to me, and will hopefully help me to work out which is the best option on a case by case basis.

    Trevor
    #222926

    Great 🙂

    Is it OK for me to close this thread for now?

    Anonymous
    #222930

    Absolutely… sorry should have said. And the other one too 😉

Viewing 7 posts - 1 through 7 (of 7 total)