When you register your post type, in your options array, set
'rewrite' => array(
'with_front' => false
),
this will remove the “blog” from the front. Remember to flush your permalinks after you make this change.
Not sure about categories being programmed through wordpress (it COULD be possible) but you could do a rewrite rule in your htaccess that redirects all /blog/category to /gallery/category pretty easily. Something like:
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^/blog/category/([A-Za-z0-9-]+)/?$ /gallery/category/$1 [NC,L] # Handle requests for "blog prefix"
Related Posts:
- Remove parent category from permalink? Basically only have the child category?
- Custom permalink structure leads to be 404 on pagination
- How to get permalinks with category base working with sub-categories
- Category archive by year with permalink support /category/YYYY
- Filtering categories in the permalink structure
- Allow duplicate permalink slugs for posts in different categories
- Force WordPress to Show Pages Instead of Category
- How do I use the same post slug for different Categories?
- Multiple post categories – single permalink
- How to exclude uncategorized from permalink structure /%category%/%postname%/
- How to get the url to tag & category base set by the user?
- 404 error on subcategory pages
- 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]
- How to display only the parent category in the permalink
- Root level category, tag, author and archive pages to work
- Archive pagination causing 404 with permalinks structure
- custom permalinks for category archive ( custom base and no parent slug )
- WooCommerce change category url and product base
- New categories are now going to 404s
- Duplicate Category and Page URL loads Category instead of the Page
- Default category link for a custom category is a broken link
- Allow dot in wordpress permalinks (only for categories)
- wordpress wp_list_categories
- How to get category URL with the slug?
- Possible to make a subdirectory that loops through a single category?
- 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”
- Changing permalink from /postname/ to category/postname/
- One Specific Category To Permalink
- Categories showing page not found
- How to disable default category linkbuilding?
- Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts
- Show parent category in URL of subcategory archive page
- Mod_Rewrite to show only last subcategory in URL
- 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
- Older entries link within category page
- How can you change the permalink for pages?
- Remove the parent name from permalink
- Redirect single article permalink to paginated category page
- 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
- How to remove one specific category (uncategorized) from post permalinks
- Custom Permalink with child categories creating 404
- How do I retrieve the category ID (ugly permalinks) in my sub-navigation menu?
- Redirect year month day postname permalink structure to category postname structure
- category link not working for a specific slug, works for others
- 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
- 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?
- 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
- When category name and title are the same … WP will select archive.php instead of single.php
- 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%/
- Group Posts by First Letter of Title categories
- /blog/ permalink prefix causes category pages to 404
- Create monthly archive for parent category
- hierarchical taxonomy in permalinks? using same slug
- Change category base based on category
- Allow duplicate permalink slugs for posts in different categories
- Changing Permalinks for Category Pages Only
- 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
- How to include first assigned category in the post URL?
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- how wordpress generates permalinks as /%category%/%post%/
- Multiple Parent Category URLs
- Custom permalinks structure
- Category archive page has two URLs even when default theme is active with no active plugins
- Custom EndPoint not working when strip child category in URL
- Use same wordpress category base and tags as the prefix as the post permalink
- How to add custom prefix before category base for category page URL?
- WordPress how to remove parent slug from category URLs