This has been a fun project that involved a lot of WP_Query and ajax calls.
The main reason for this project was to allow for our users to see all of there content (everything they are subscribed to) on one page in a way that would allow them to filter and search for individual articles at the same time.
It has several features that I will go over below:
Once you reach the bottom of the feed more stories will load automatically. I basically did this with js to determine when the user is at the bottom of the page, determine how many stories have already been loaded by counting the number of li elements already on the page and offsetting my query by this number. Then with all of this information I make an ajax call back to the server to get more stories.
For this I basically just used the wordpress native keyword search functionality within WP_Query to filter through posts. This is also a feature that does not require a page re-load since I run a new query with an ajax request. This is the first of many filters that work together to create one filter with several parameters.
The right side bar is where you can filter the subscriptions (Custom post types) you see. Again this is fed into a WP_Query instance with ajax (as most of this page works this way). You can also filter by date of the posts.
Here we allow for users to determine if they don’t want to receive certain subscriptions from their dashboard. We do this by basically setting tags through middleware to our CRM. Then from there we exclude people or include them based on these tags in our mailing system. Since this could possibly go wrong if middleware goes down we also store what the customer has set on the sites DB and check against what our middleware returns to make sure everything matches up.
There are several other small features that went along with this project but these were the biggies. This certainly was a cool project and taught me about the difficulties of re-designing a current site.