• Hello all,

    I am building a website using WordPress 5.3.1 and just ran into an issue I can’t seem to get my head around it.

    I use several post categories: a few parent categories and a bunch more sub or children categories, like this:

    PRODUCT MAIN CATEGORY 1 (parent)
    + SUB CATEGORY 1A (sub category)
    ++ POST 1A-01
    ++ POST 1A-02
    + SUB CATEGORY 1B (sub category)
    ++ POST 1B-01
    ++ POST 1B-02
    PRODUCT MAIN CATEGORY 2 (parent)
    + SUB CATEGORY 2A (sub category)
    ++ POST 2A-01
    ++ POST 2A-02
    + SUB CATEGORY 2B (sub category)

    etc.

    My problem is that permalink structure is different for items in different categories.
    The preferred permalink structure would be:

    my.domain.com/product-main-category/sub-category/post

    However, this only works for one of the main categories (the first main category I created), while other main categories would show like: my.domain.com/product-main-category/post, missing the sub category from the url.

    Permalinks settings is “Custom” with /%category%/%postname%/ as structure.

    I’m sure that the solution is something very simple, yet I’m not able to find it and it makes me crazy. ??

    Any help would be appreciated, thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    => You can set “Product permalinks” undo the WordPress Settings > Permalinks.
    => Set custom base permalinks structure like this, [https://prntscr.com/qxrhs5] and save.

    Thanks!

    Thread Starter bldone

    (@bldone)

    Hello @aimsinfosofts, thanks for your feedback! I’m sorry to say that this does not solve my issue as I don’t use any shop plugins (I don’t even have the settings that can be seen on your screenshot), all the product pages are just regular post entries, with the appropriate categories assigned for them.

    I would like to have the URL permalinks build up automatically, based on these categories and it does work for one subcategory, but doesn’t work for others.

    So for example:
    my.domain.com/product-main-category-1/sub-category-1A/post-1A-01 works (this is the only one where url permalinks are shown properly on my test site), while
    my.domain.com/product-main-category-1/sub-category-1B/post-1B-01 (and all other variations) does not work.

    Thanks!

    • This reply was modified 4 years, 9 months ago by bldone.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permalink structure not consistent’ is closed to new replies.