I think the simplest way would be to just use the category archives that WordPress already generates. Change the category base in permalink settings to issues
so you have nice URLs, then in the category template, check if you’re viewing a top level or child category, and display the appropriate markup:
$this_category = get_queried_object();
// if parent is 0, category is top level
if( 0 == $this_category->parent ) :
// top level category,
// show child categories of this issue
$args = array(
'child_of' => $this_category->term_id,
'title_li' => '',
'hide_empty' => 0
);
// output a list of child cats for this issue
// see also get_categories or get_terms if you wish to use your own markup
wp_list_categories( $args );
else :
// child category,
// show articles in this subcategory, etc.
echo 'child category';
endif;
Related Posts:
- iFrame permalinks on WordPress
- How do you change the permalink for posts for a single category?
- Change permalink structure in all sites of a multisite
- How to separate an overgrown blog into sub-blogs – without breaking existing inbound links?
- Problem with two WP installation on root and subfolder
- How does Permalink work with the AMP plugin after Removing Parent Permalink Catalog from Posts
- Using a template file for a specific custom URL
- WordPress image title attribute becomes permalink? [duplicate]
- Nested permalink without dummy parent page
- Category URL’s 404 after setting category base to ‘.’
- Website URL Permalinks
- WordPress url customization
- Include a page’s “category” in its URL
- Custom Permalink (with category) for Pages
- Custom Permalink Structure for The Events Calendar
- Author URL using wrong domain after using Edit Author Slug
- WP permalink working, but why content doesn’t display
- I have a 404 error on all my pages! What do I do?
- 404 on wordpress multisite Permalink pretty URLs
- All files in public_html, Cannot launch WordPress site via wp-admin
- Giving specific category posts its own permalink structure returns 404
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- Extra url paths as variable
- Replacing + sign to – in wp Search Permalink
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Flushing rewrite rules enables to see an article, but I didnt change anything
- Cannot publish posts or pages when I change permalink structure
- Permalinks are not working in WordPress
- Changing link format from Calendar widget
- home page slug editor missing from WordPress
- Custom permalink structure with a prefix just for posts
- Passing parameter through permalink structure
- Wrong category in URLs accepted like the correct one
- Changing permalink stops me from creating webpages
- How to add a ‘News’ section to specific posts in WordPress
- Add word to permalinks does not transform the urls
- Permalink length
- Make query parameter an endpoint
- Custom Taxonomy rewrite rule causes 404 error on page or single post depending on if it’s set to “True” or “False”
- Change permalink structure
- How to create a standard WP Page that has the same url as an archive
- Redirect page to homepage, keeping URL
- WP adding noopener and noreferrer to all links
- Permalink conflict with React Router in subfolder
- Internal forward link with add_rewrite_rule
- How to 301 redirect from url with post id to permalink with post name (slug)?
- Add slug to default post permalinks ONLY
- Adding query string to multiple page urls in a WordPress function
- permalink not showing correctly using wp_insert_post and post_name
- 301 redirects after changing permalinks
- 404 on pretty permalinks when serving via HTTPS
- 404 error on published page with specific permalink
- CPT links error: each one links to next one further along in the list
- Post links broken after migration
- I have Akamai pointing to a WordPress installation with a different URL. Is there a way to make WordPress use this for link generation?
- Permalink issue with WordPress Site at domain root and another WordPress Site in a Subfolder
- Issue with wp_insert_post when modifying permalinks with “.html” extension
- Custom optional parameter in page URL
- How to change permalink for listings
- WordPress Pages that use Domain URL
- Posts containing a specific tag and a category in one permalink
- 404 page not found – Yet open admin page it works
- Custom permalink question
- Disable -2 Permalink Addition
- Permalink in relation with the files
- Permalinks don’t update nor link properly
- How can I put WordPress in a directory but keep just the home page at the domain root?
- followup to: Page begins with number, WordPress adds 2
- One post but two separate permalink structure and template views
- Add /blog prefix for all WordPress front end url
- permalinks constantly needs re-saving
- Permalink structure has suddenly changed
- Link to a custom page without a permalink?
- Pages with parent pages giving 404 errors
- Getting 400 Bad request Error when trying to open posts after updating to wordpress 5.0
- How to experiment with permalink structure on a select number of posts
- In a multisite, how can I get posts from one site and display their permalinks in another site?
- How to change permalink for pages in WordPress?
- Disable “similar permalink” redirect [duplicate]
- Problem with get_permalink, to get page content
- Why does page for hierarchical taxonomy parent term go 404?
- Rename Custom Post Slug using taxonomy
- Change permalink structure with post id
- Link works although page was moved to another location
- How to allow different authors to use same post slug?
- Custom permalink gives 404 error only in some pages
- Can I link to content dynamically from a page to a new page?
- Question About Permalink in wordpress
- Logging in to installation in subdirectory renders broken dashboard (no CSS, broken links)
- while changing permalink, page redirected you too many times
- Woocommerce product page 404 not found
- WordPress – Permalink custom Structure – 404
- I noticed only on 2 pages I keep getting permalimks changed with added -2 or -3?
- How can I have a page’s permalink include my custom post type’s slug?
- Every sub page shows Error 404, i have check permalink but still same issues
- Remove Permalink of certain posts
- Subcategory Page 404ing
- Bulk update set of URLs via SQL
- Added a prefix in URL permalink structure but the old structure still working!
- WordPress and Woocommerce Chinese Permalink