visual-portfolio
visual-portfolio copied to clipboard
filter options
Would it be possible to create more visual options for the filter settings? Could there be a filter that acts as a search, for lets say the category year, such that I could type in 1994 and only posts categorized with that year appears in my grid?
In plans 1 additional style for the filter that looks like dropdown.
To add search you will need to customize default templates for this filter. I don't think search will be added in the near future.
Had an issue when visitors would use the back button to return to a filtered results page.
Some devices cached the page in its original state, and others cached the page in it's filtered state. (Behavior was very inconsistent. the same browser would behave differently on different devices)
I was able to conclude this was due to the way the AJAX call is used to reload the page, so that the query parameters are hidden from the address bar.
commenting out the e.preventDefault() in assets/js/script.js allowed the page to transition naturally, using the query parameters. This allowed each filtered result to be cached as a page individually.
I've started looking into submitting a pull request to allow this to be a toggle setting, but was not sure exactly how to best implement this to match your style.
@Carson2006 which devices are you talking about? The latest Android Chrome and iOs Safari don't "cache" the page state.
Since we use AJAX loading without state change, the browser doesn't know the page was changed (actually it wasn't changed, we only loaded the new content for the Portfolio shortcode).
If you want to change address state once AJAX loaded, first we need to create better permalinks for the filters and sort. https://github.com/nk-o/visual-portfolio/issues/7. But currently, I don't know how to make it possible.
p.s. Better to create a separate issue.