Gallery and Table Toggle for Results

Forums › Forums › Search & Filter Pro › Gallery and Table Toggle for Results

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

    What plugins are you using, aside from S&F Pro? If it is a long list, a plugin called system snapshot report will make it into a list for you!!

    Anonymous
    #41540

    The plugins I’m using are:
    Advanced Custom Fields
    bbPress
    Category Tag Pages
    Custom Post Type UI
    Enhanced Media Library
    Manual Image Crop
    Page-list
    Recent Posts Widget With Thumbnails
    Relevanssi
    Search & Filter Pro
    Simple Image Sizes

    Trevor
    #41542

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

    Anonymous
    #41546

    Thanks! Please let me know if you think of something.

    Anonymous
    #41686

    Hi again,
    I think I have figured out a way to implement the view toggle, but I need to get the bookmark URL in the address bar. Does S&F provide a way of getting this URL within the page code, or do I need to build it myself?
    Thanks!

    Trevor
    #41688

    I am not sure that I understand you.

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

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.