As per your requirement, Just create two categories like cat1 and cat2. After that, you can assign categories from the Post A and Post B.
Then WordPress creates the default URL Like this:
Post A: example.com/cat1/post-a
Post B: example.com/cat2/post-b
Related Posts:
- Custom permalink structure only for default posts
- Custom post type single (permalink) throws a 404 error
- Custom post type permalinks breaking due to 3.1 bug fix
- Editing the default page to show all posts, rather than most recent ones
- How could I change my Permalink from blog to custom structure? [closed]
- register_post_type permalink
- Custom home page with full post for first one only
- Inserting an example of the last 3 post on to the homepage
- Post titles and thumbnails as links to custom post types?
- Changing permalink of WordPress
- Include Recent Post in Category
- Custom Post Types and Broken Permalinks
- Permalink base only for posts
- Append a random string to a post permalink
- How to have more post in a page than in your home page
- Default post type doesn’t display in url
- Changes done in admin panel are taking time to reflect in the REST api responses
- Is there a action hook for the “Empty Trash” button?
- Add a checkbox to post screen that adds a class to the title
- How to automatically generate a unique random slug
- delete post also attachments
- Attach pdf file to custom post type
- Navigation link to specific user page
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- How to edit wordpress RSS feed to show post title only
- Add custom field to category of custom post type
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- user contributed content as custom post types
- Remove custom posts that match taxonomy value
- Custom Theme Want To Remove One Category From All Displays
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Can I set and show “important” post in my blog?
- Post Type Label Name
- wp_query ‘s’ parameter does not work with custom post type
- Blog Posts in Custom Menu
- How to display data in archive page?
- Best way to assign post position in a news site homepage? (no categories, no sticky posts)
- Display posts styled exactly like default posts
- Enable Comments Box On Custom Post Type
- How can i limit the number of posts created per category?
- How to do set post permalinks using 6 digit random unique function?
- Responsive images with custom image size
- Trying to use AngularJS with WordPress without any API
- Take a received feedback item, turn it into a post
- how do i add posts-page slug before posts slug in permalinks
- Admin – create custom post status and display above table
- Set Default Category to Username
- the_permalink() not working in a root installation
- Hide posts belongs to few categories in homepage
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Customize rel=canonical tag for single blog post
- disable Tab post on nav-menus page (Admin)
- Second get_permalink inside loop points to wrong URL
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Is codex right on deleting post?
- if in category but only with post meta
- How to get different Related Posts
- Post is blank when I click on the link
- l accidentally permanently deleted a Draft. There’s any way I can recover it?
- Get a term each custom post type
- links to posts not working on homepage
- Can Permalink structure of %postname%/%post_id% improve performance
- Getting post and attached image from subdomain
- Custom post type slideshow background images to insert in a plugin
- Help on conditional statement to accompany wp_insert_post function please?
- Remove subcategory slug from url
- Can I show category name in url for only one of my categories?
- Search results for ACF data
- Private post caught in endless redirect loop
- Redirect to custom post if custom archive page has just one result?
- Multiple posts in one page
- Blog featured images disappeared on my homepage
- delete post hook not being fired when deling in wordpress dashboard admin
- WordPress Delete Users from backend doesn’t work
- Is it possible to make a custom post that adds multiple pages?
- Custom post styling per category?
- Point users to a specific url directory for some posts
- Hook To Get All Posts Deleted
- Meta boxes not saving
- Custom Select Query pagination not working properly
- Custom URL Structure for posts with subcategories
- How to show the posts list into a static page? Problems to use the loop into a static page
- Adding The Post Template Dropdown to WP-Admin
- wordpress paginate, link to the right page
- Allow users to create their own page/s
- 404 for some custom taxonomy not ALL taxonomy
- Add default content to post (for specific category)
- WordPress strips some attributes for author posts
- How to Do Custom Fields to Output a Definition List
- Display one post randomly from category on home page
- Deleting first four characters from all Post Titles
- Deleling wordpress posts permanently still have IDs
- Taxonomy Category category.php not working
- Post’s arent displaying
- Can I get custom post items in select box (dropdown)
- How to have 2 posting pages on a blog
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields
- How to change Permalinks only for Blogposts
- How to add paraent in Blog post URL in wordpress