Reputation: 55
I have a rather challenging project where a finance magazine using WP wishes to digitalize their print offering. As you could expect all articles are uploaded manually by them and divided into various subcategories (e.g. economy, politics etc.). These are then displayed on various category pages. The articles uploaded consist mainly of all the articles that are also found in that months issue.
The aim is to display a table of contents for that issue, allowing readers to directly see a list of the articles published. Basically an identical copy of Bloombergs businessweek: https://www.bloomberg.com/magazine/businessweek/20_23 (side question: anyone can guess how BB does this?)
Now lets say all articles belonging to that issue are given an extra category or possibly term, such as issue 20/05, using a wp_query you could pull in a list of all articles from that issue. In order to then divide them into subcategories, which already exist since thats how they are displayed online, I could then have an extra loop that would pull in all articles that contain the term 20/05, as well as economy. Is that possible using: 'taxonomy' => 'category', 'term' => 'category-1' As techincally the term would be the parent category.
This method would require the page to be duplicated and the new term inserted every month, but apart from that its quite easy. Very new to php and wondering if this challenge is maybe beyond me. Any pointers or tips much appreciated.
Upvotes: 0
Views: 40
Reputation: 1689
If I understand correctly, you need to use categories in their default way but also group them by another taxonomy "Issue", for example. You could register a custom taxonomy: https://developer.wordpress.org/reference/functions/register_taxonomy/ and call it "Issues" for example and then each post can belong to one of the issues.
Then you can use tax_query to filter posts that belong to specific issue: https://developer.wordpress.org/reference/classes/wp_tax_query/
You can also have a Taxonomy archive template https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/ where you can display issues.
Upvotes: 1