• Resolved nitrospectide

    (@nitrospectide)


    I have my product pages set to use this Permastructure:

    products/%product_types%/%products%

    So when these hierarchical taxonomy terms are selected on the post:

    -| Accessories (top level term)

    –| Antennas (child term)

    …this permalink is formed:

    /products/accessories/antennas/base-station-antenna

    But on my pages where there is a 3rd level (grandchild) term, this is not coming through in the permalink. When the selected taxonomy terms are:

    -| Accessories (top level term)

    –| Cables (child term)

    —| Arrow Series (grandchild term)

    …this permalink is formed:

    /products/accessories/cables/usb-cable

    Why is this 3rd level not appearing in the permalink?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @nitrospectide,

    The plugin should automatically use the lowest-level term assigned to the product. It may not work, if you selected a different term as a “primary”.

    Could you check if the issue still persists if “Primary category support” is disabled in the plugin settings?
    https://permalinkmanager.pro/docs/tutorials/add-category-slug-wordpress-permalinks/#primary-category

    Thread Starter nitrospectide

    (@nitrospectide)

    Thank you. Disabling “primary category support” did it.

    I don’t understand why, though. In RankMath for that CPT, I had the correct taxonomy selected as the Primary Taxonomy. It seems like it should have worked.

    And then when reading your documentation, I don’t understand the difference in what is described for the two settings. It sounds like both do the same thing:

    Enabled: “When the child category is selected, the slugs of all of its parent categories are included in the post URL”

    Disabled: “After you disable it, the default post permalink will use the lowest available category (including its parents, if available).”

    These sound like they describe the same behavior.

    Plugin Author Maciej Bis

    (@mbis)

    Not exactly, it depends on whether you select as the primary term the lowest-level term or its parent.

    Both settings, will work the same only when the lowest-level term is also selected as a primary term, or when a primary term is not defined at all.

    1) If a “lowest-level” term is the Primary Term OR no Primary Term is selected

    If “Arrow Series” (grandchild) is selected as the Primary Category for the post, the custom permalink will include all parents down to the lowest level:

    /accessories/cables/arrow-series/post-name/

    2) If a “higher-level” term is the Primary Term

    If you choose a higher-level parent as primary (e.g. “Cables“), the custom permalink will stop at that level and omit the slugs of any children.

    /accessories/cables/post-name/

    In short, if a primary term has any children (meaning it is not a lowest-level term) Permalink Manager will ignore their slugs.

    Thread Starter nitrospectide

    (@nitrospectide)

    Ahhhhh. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Permalink omitting 3rd level taxonomy term’ is closed to new replies.