Forums › Forums › Search & Filter Pro › Gallery and Table Toggle for Results
- This topic has 6 replies, 2 voices, and was last updated 9 years, 1 month ago by
Trevor.
-
Anonymous(Private) April 4, 2016 at 4:36 pm #41537
Hi,
I’m interested in having the option of the user selecting to display the results of Search & Filter in either table or gallery format. I currently have the form in the sidebar and the results are displayed using a shortcode and ajax on the page. The option of selecting table or gallery could either be in the form or the page showing results. I have been playing around with adding links in the results for table and gallery views by using add_query_arg() to add a view_type arg to the URL. This works before any filters are selected and the link looks like:<a href="http://localhost:8888/wordpress/wordpress/resources/?view_type=table">
Once I select a filter, the link becomes:
<a href="http://localhost:8888/wordpress/wordpress/resources/?post_types=project&view_type=table">
And this results in an “Oops! That page can’t be found.” message
In the above examples, I removed the sfid from the URL, since it isn’t in the pagination URL. Also when I keep the sfid in the URL, the link leads to a page of text starting with {“form”:” and looks like it’s the Search & Filter form.
I would like the filters selected in the form to continue to be selected after the view type has switched. It seems like pagination works in a similar way to what I want in that it adds an arg for the page (sf_paged) and it keeps the filter values.
I would really appreciate any help you can provide! Also, I completely understand if this question is beyond the scope of the support forum.
Thank you!
Trevor(Private) April 4, 2016 at 5:25 pm #41542I cannot see an issue with the plugins there. I think that you are trying to do too much in the query. With what you have, I see no way to do what you want. An interesting proposition though, to be able to change the layout. I will file it at the back of my mind and see what a few nights there might bring.
-
AuthorPosts