Forum Replies Created

Viewing 1 replies (of 1 total)
  • xxbreadwinner

    (@xxbreadwinner)

    You’re running into a common permalink limitation in WordPress. When you add /blog/ to your post permalink structure (e.g. /blog/%postname%/), it unfortunately applies to all post types using the 'post' rewrite slug — including custom post types, unless handled separately. ✅ Solution:

    To have only blog posts use /blog/ and keep custom post types clean (like /jobs/, /our-team/), you can do this:

    1. Leave your permalink structure as /blog/%postname%/
    2. Manually set the 'rewrite' => ['slug' => 'custom-slug'] argument in each custom post type’s registration. This overrides the global /blog/ prefix for that post type.

    Example (in your theme’s functions.php or CPT plugin):

    phpCopy code

    register_post_type('jobs', [ 'labels' => [...], 'public' => true, 'rewrite' => ['slug' => 'jobs'], ... ]);

    1. Flush permalinks after this by visiting Settings > Permalinks and clicking Save.

    If you’d like categories to appear like /blog/category/category-name/, go to:
    Settings > Permalinks > Optional and change the Category base to blog/category.

    Here are examples from my site that use the proper structure:

Viewing 1 replies (of 1 total)