Support

Account

Home Forums General Issues Use CPT slug in taxonomy URL?

Solving

Use CPT slug in taxonomy URL?

  • Hello.
    I’m using ACF Pro to register my CPTs and taxonomy and I’m looking for a way to keep my CPT slug as part of a taxonomy URL. Example:

    CPT: Articles
    Taxonomy: Categories

    CPT Archive URL: mydomain.com/articles
    Current taxonomy URL: mydomain.com/categories

    The URL that I’d like: mydomain.com/articles/categories

    Any suggestions would be appreciated.

    Thanks,
    Kristin.

  • In order to do this you must create your own custom rewrite rules.

    The best information I’ve come across is this https://1fix.io/blog/2016/02/05/parent-from-another-cpt/

    It is about using 2 different post types but it would be similar.

  • This is the solution I ended up using. For whatever reason, my rewrites weren’t working when I was registering the CPT and taxonomy via ACF (order didn’t matter); with registering them as code in functions.php, then it worked.

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

You must be logged in to reply to this topic.