I have a site with posts going back 5 years and I want to create a couple landing pages to highlight groups of posts. For example, I want to create a page about "blue widgets". The page should include some new content that I will write about "blue widgets" and I want to dynamically include posts that match "blue widgets". Any ideas on how to best accomplish this?
The best solution here IMHO is to create a custom taxonomy named "highlights" or something similar. You can then create new terms for each landing page that you wish to create. The of of which would probably be "Blue Widgets". You can then associate as many posts to the "Blue Widget" term as you wish. For the "Blue Widgets" term, you can add a custom description via the WordPress administration panels and allow it to appear in your theme by using the
term_description() template tag. I would suggest adding this to a custom template file that you create to display term archives of the "highlights" taxonomy. taxonomy-highlights.php should work. Please read this thread for ideas on creating the custom template file.
I use a very similar approach on my own site fir WordPress functions. Here's a link to a landing page that has a description of the
setup_postdata() function as well as all posts that use this function.
Best wishes, -Mike
Like an archive? yoursite.com/archive/blue-widgets
Since your posts about blue widgets contain the blue widgets keywords you might as well go with a related posts plugin.
Other than that, the only clean solution I could think of right now is creating a custom shortcode to squeeze in lists of posts that match a certain criteria which you'll pass on to a new WP_Query. Criterias could be post IDs, a search query, a taxonomy query or even a meta query.
Let me know if you need further explanation on this.
Create a page template and do a custom query over there, like posts from a certain tag, post title containing words on even in post_content or even a combined version of all of them. And I would strongly suggest you to cache the query results in a transient so as not to do those heavy queries everytime a page is generated.