I have an interesting problem that I could use some help resolving.
I need to know if there is a way to grab posts from the most recently created category in WordPress.
My client has a magazine type theme going on. I am using the default category creation functionality of WP to allow them to create new "issues" each month. The category is actually the month and year. Think of a magazine, where for example the current issue(Category) is March 2015. They will create a new issue(Category) each month, and of course articles will be posted in sub categories of the current issue(Category).
How can I grab posts from the most recently created category for each month to display on the front end? This way in a table of contents it would look something like:
- March 2015 (Main, or "current" Category)
- Sub Category
- Article Title
- Article Title
- Article Title
- Sub Category
- Article Title
- Article Title
- Article Title
- Sub Category
etc etc.
I am more of a front end designer and am unsure how to do this. Will this require custom SQL?
Any help or advice would be very much appreciated.
Thanks!