Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    For the sake of this reply, I’m assuming that “work” is the post type. Not quite sure if “animation” and “ecommerce” are the taxonomies, or terms in the taxonomies.

    I’m curious if doubling up on the tutorial linked to is what’s needed. For example with the resources_cpt_generating_rule callback from the tutorial, either repeat the process for the separate taxonomies in there in that same callback, or duplicate and change taxonomies in that new second callback.

    Same thing with the last one that changes the links.

    Thread Starter dgirona

    (@dgirona)

    Yes, “work” is a custom post type and “animaton” “ecommerce” are the taxonomies.

    In this tutorial that you published in a previous post https://www.ibenic.com/custom-wordpress-rewrite-rule-combine-taxonomy-post-type/ does not solve the problem of nested taxonomies.

    example.com/work/animation/case-study-1 (custom post type) OK
    example.com/work/animation/subanimation/case-study-2 (custom post type) KO
    example.com/work/ecommerce/case-study-3 (custom post type) OK
    example.com/work/ecommerce//subecommerce/case-study-4 (custom post type) KO

    example.com/work/animation/ (archive listing) OK
    example.com/work/animation/subanimation/ (archive listing) KO
    example.com/work/ecommerce/ (archive listing) OK
    example.com/work/ecommerce/subecommerce/ (archive listing) KO

    How would you have to modify the tutorial script for these urls to work?

    Thanks : )

    • This reply was modified 3 years, 7 months ago by dgirona.
    • This reply was modified 3 years, 7 months ago by dgirona.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Honestly, I’d need to attempt some tinkering and trial+error to see if I could get that setup to work.

    The joys and headaches of customizing permalinks, which goes above and beyond what CPTUI itself handles, which is just the registration of the content types.

    I’ll see if I can manage to circle back around to this and come up with anything, but can’t promise anything either.

    Thread Starter dgirona

    (@dgirona)

    Thank you very much for your help, after looking for solutions in different forums, I am sure it would be a feature that would be well seen by the users of this fantastic plugin.

    Thanks Michael : )

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    It’s not something that’d get built into the plugin itself, but probably more some custom documentation of sorts of how to potentially achieve that permalink structure.

    Thread Starter dgirona

    (@dgirona)

    Hello Michael!

    I have found a solution for my question.
    There is a plugin called Permalink Manager Pro.
    After talking with its developer Maciej Bis (@mbis) and making an adjustment in the taxonomy links “add_filter (‘permalink_manager_primary_term’, ‘__return_false’);”, everything went well.

    I leave you two links with more information in case they were of interest to you where they explain how to do it.

    https://permalinkmanager.pro/docs/tutorials/add-category-slug-wordpress-permalinks/
    https://permalinkmanager.pro/docs/tutorials/how-to-make-hierarchical-post-types-taxonomies-permalinks-flat/

    But to make it work we had to apply the filter add_filter (‘permalink_manager_primary_term’, ‘__return_false’); so there is no primary taxonomy.

    Hope this can help other users.

    Thanks for your help michael ??

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Will definitely review, if anything just for my curiosity sake. Thanks to you, too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘custom post type and taxonomy in the same url with hierarchical taxonomis’ is closed to new replies.