I am doing something similar, but for member pages. I was able to use the code in my answer linked here which parses the information in the URL which can be manipulated within WordPress.
https://wordpress.stackexchange.com/a/91399/12920
Here’s a snippet of the URL handling portion which perhaps will get you started? Granted you’re doing something different than me, but the underlying function should be very similar.
// Catch the URL and redirect it to a template file
function userpage_rewrite_catch() {
global $wp_query;
if ( array_key_exists( 'member', $wp_query->query_vars ) ) {
// Do something if member is in the URL
include (TEMPLATEPATH . '/user-profile.php');
exit;
}
}
add_action( 'template_redirect', 'userpage_rewrite_catch' );
Related Posts:
- Is There a Difference Between Taxonomies and Categories?
- Custom permalink structure leads to be 404 on pagination
- How to get permalinks with category base working with sub-categories
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Filtering categories in the permalink structure
- How to remove category from wordpress url?
- Multiple post categories – single permalink
- How to create a custom url for a category [closed]
- How to change the category in URL for posts in multiple categories?
- How to exclude uncategorized from permalink structure /%category%/%postname%/
- How to get the url to tag & category base set by the user?
- Categories’ hierarchy in URL
- How to Include the Parent and Child Category in the Permalink if the Post is Added to Both
- Category links suddenly started giving 404 errors
- Best and Cleanest way to remove /category/ from category permalinks? [duplicate]
- Root level category, tag, author and archive pages to work
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- Archive pagination causing 404 with permalinks structure
- Plural Category Base Slug On Category Archive Page
- custom permalinks for category archive ( custom base and no parent slug )
- WooCommerce change category url and product base
- Removing category base form links messes up the parent-child behavior
- How to set up Author archives with sub category URL
- Allow dot in wordpress permalinks (only for categories)
- How to get category URL with the slug?
- Specifying multiple categories in URL (permalink)?
- WordPress subcategories return 404 in custom template
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- How get permalink for the current category or tag?
- Add “page-a” slug to category link if user visit category link from “page-a”
- Redirect category to url with /category
- Changing permalink from /postname/ to category/postname/
- One Specific Category To Permalink
- How to disable default category linkbuilding?
- Show parent category in URL of subcategory archive page
- Mod_Rewrite to show only last subcategory in URL
- Permalinks: display just one kind of wp category in the posts url
- Multiple URL’s based on category for one post
- category permalinks
- Sub Categories Keep Redirecting to Pages With Same Slugs
- How to rewrite the post URL according to the category?
- Removing subcategories from permalinks [duplicate]
- A single category with a specific permalink structure differing from the standard set for the rest of the site
- Remove the parent name from permalink
- Redirect single article permalink to paginated category page
- How to add a post without assigning to a category?
- Hide the word ‘category’ from my permalinks
- WordPress alphabetical A-Z custom post type post result display
- Hierarchical permalink structure for posts showing categories and sub-categories
- Use the category name instead of category slug in permalinks
- Function to automatically rename the base category permalink
- Cannon see subcategory in permalink
- Redirect Changed Permalink on wordpress
- Custom Permalink with child categories creating 404
- How do I change the category permalink structure?
- Redirect year month day postname permalink structure to category postname structure
- category link not working for a specific slug, works for others
- Advanced permalinks structure
- Pagination breaks on child-categories, works fine on parent-category
- Is the part “category” fixed to an URL to an archive or post?
- prefix to post permalinks without affecting category permas
- Category URL Management
- Need help with major category and permalink re-organization
- 3.1 post formats and specific categories/custom taxonomies
- Subcategory Page URL to Display Only Posts from that Subcategory?
- How to use category slug with a regular page
- Using custom structure prefix showing 404 for sub-categories
- How to add tags under categories
- How to remove category name for only one category?
- How to set the same base url for two different taxonomies?
- Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
- Get multiple category names from permalink
- Get category base permalink
- Category URL’s 404 after setting category base to ‘.’
- Include a page’s “category” in its URL
- Wrong category in URLs accepted like the correct one
- Remove “category” from permalink with add_rewrite_rule
- Remove base category gives 404 error
- Custom permalink /%category%/%postname%/ produces 404 on each post
- Change Category Base For Custom Post Type or Posts Page
- When category name and title are the same … WP will select archive.php instead of single.php
- WordPress Category url redirects to subdomain
- Accessible Subcategory URL’s pages without using .php hack
- same permalink for parent category and child category
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- /blog/ permalink prefix causes category pages to 404
- Create monthly archive for parent category
- Page Type with Category Link
- Change category base based on category
- Allow duplicate permalink slugs for posts in different categories
- Most efficient use of custom taxonomies, categories, and pages
- Removing short versions of category archive URL
- Change next_post and previous_link to navigate throught parent categories only
- Using pagination with multiple loops causes it to break
- how wordpress generates permalinks as /%category%/%post%/
- Create custom Perma link
- Multiple Parent Category URLs
- Use same wordpress category base and tags as the prefix as the post permalink
- WordPress how to remove parent slug from category URLs
- How to remove the category from the url only for a specific category of articles on wordpress