Forums › Forums › Search & Filter Pro › using theme results template but not working properly
- This topic has 10 replies, 2 voices, and was last updated 6 years, 4 months ago by Trevor.
-
Anonymous(Private) June 8, 2018 at 2:50 pm #180066
I’m using Listify theme. I have setup a few filters as a trial test.
When filters are selected the new results do load up in the same page which I want, however the format is different. (On the original I have some custom styles and results also display in 2 columns) When I use the filters they reload in a one column setup and the styles or well the way they are displayed is very different.Wondering how I can fix this issue.
Anonymous(Private) June 8, 2018 at 3:47 pm #180076When i disable Ajax, i beleive it loads into a seperate page alltogether. not sure.
Just hit the search button right on the front page and it will bring you to the listings archives with all listings on my site.
once there you will see the filters i added with the plugin on the sidebar.
Trevor(Private) June 8, 2018 at 4:29 pm #180091I changed the Ajax Container from
#main
to.job_listings
, but this still didn’t work.I looked at your Listings page in the editor and found it had a shortcode in it
[jobs]
This is fetching the loop content and is the reason why the As an Archive method will not work. If the plugin that makes this jobs shortcode was written correctly (it is not), switching to the Custom mode should enable the use of our
filter_next_query
shortcode to work. I have left the shortcode on the Listings page for you to see.But that does not work either. You will need to ask the plugin author of the plugin that uses that jobs shortcode if there is any way you can hook an additional argument in to their query, then we can can do that, also using the Custom method.
Trevor(Private) June 8, 2018 at 5:09 pm #180099Ah, OK.
I did try to see if I could get it to work before replying to you, but I could not.
In order that you see results on a page, a theme or plugin must create what is called a loop (it loops over and over though the WordPress database searching for posts that meet the criteria). To do this, it will normally (but doesn’t have to, it is just recommended practice) use the WordPress wp_query() function to send ‘arguments’ (a list of desired filters and sorting parameters) to the database.
We need to add another argument to that list of arguments. Some plugins have what is called a ‘hook’ that allows you to do it. If the plugin does not have such a hook, they are really easy to add and would probably prove useful to other users of the plugin (so the author might consider that as a feature enhancement).
If the author wishes to speak directly to me, get back to me with their email address (keep THAT post private should you send it here).
Anonymous(Private) July 10, 2018 at 1:03 am #182197Sorry for the long delay.. ive been chatting with them and here is their response…
So, the jobs shortcode has a few hooks already:job_manager_output_jobs_defaults
job_manager_output_jobs_args
job_manager_job_listings_outputOur developers recommend you start with the above hooks, and trace the flow in the output_jobs function to find others, to see if there is an existing hook you can use.
If not, you can give us more information about what argument you’d would like to have added, and we can see about implementing it in the future.
Cheers!
Post Link: https://wordpress.org/support/topic/using-a-filter-plugin-that-needs-a-hook/#post-10475973
-
AuthorPosts