Hey all! So I’ve been tasked with building a website using several different CPTs. They already exist, have several taxonomies attached and tied into parts of the website. I now have to build an archive page, that allows for three things:
1. Filters: combine, add, or remove different taxonomies
2. Sorting: Default by an ACF field called ‘cpt_numeric’. Front end users can use change this to be alphabetical, sort by date, or reverse the order
3. Ajax/lazy loading for more. Eg, show 9 of these CPTs first, then the extra 9 on scroll down or “load more” button
I’m okay to custom develop these, but I’m hoping there’s a library or something I’ve overlooked. I’d rather avoid the plugin approach as the website is for a legal firm and they’ve asked for as little plugins as possible.
I’d also like to note I’ve mostly rebuilt the website locally, upgrading so many loops from PHP7 to PHP8, and changed quite a bit of template parts so far
Or, Is this question specific enough to bring to thenPro WordPress subreddit ?
[ad_2]
Search & Filter Pro or WP Grid Builder or full custom dev.
Law firms don’t tend to know how plugins work – so don’t take advice from non-technical users. Sounds like they subscribe to the good old “more plugins = more bad” urban myth.
You’re going to want to google this as there are a few different ways you can accomplish this. Preferably, you’re going to use JavaScript with AJAX to query posts based on active filters.
Check GitHub for possible starter solutions, too.
There are some plugins that can add this functionality, too. Might be a good idea to try a few out to see if they meet your requirements. Google “Wordpress posts filter plugins”
If you do go custom, I’d take this to r/prowordpress as it’s a bit above general use cases.
There’s a very active community around the Loops and Logic plugin. It’s also being actively developed with extensive input from outside contributors https://wordpress.org/plugins/tangible-loops-and-logic/
I won’t vouch for it but a number of people I interact with online love it, saying it’s a great intermediate step between pre-fabricated and therefore constrained loop and post plugins and writing raw code.
I’ve only used it once or twice for very small tasks that go beyond the constraints of this or that block or builder module. But evidently the devs get pretty excited when you throw new stuff at them.