This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 3 days, 7 hours ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10560

    tech500
    Participant

    I got confused now by the taxonomy options in Meta Box.

    The client has products under category & sub-category.

    example:
    /product/main-cat/sub-cat/product-1
    /product/main-cat/product-2

    Right now I don’t get the categories & sub-categories in the URL.
    That’s what I get:
    /product/product-1
    /product/product-2

    That’s the taxonomy setup that I have:
    https://cl.ly/142f0q0j3p2b

    Permalink is set to /%category%/%postname%/

    Post type “product” is also set as hierarchical.

    Don’t understand why the product terms are not in the url.
    What am I doing wrong?

    #10575

    Anh Tran
    Keymaster

    Hi Dan,

    There’s nothing wrong with your setup. It’s just the WordPress’s behavior. It doesn’t support adding term’s slug in the permalink of the custom post type.

    To make that happen, you have to write your own code. I have found some useful links that might help you:

    https://wordpress.stackexchange.com/q/49141/2051
    https://stackoverflow.com/q/21279963/371240
    https://en-gb.wordpress.org/plugins/custom-post-type-permalinks/

    And be careful with rewriting. It’s hard and confusing.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.