• niska

    (@niska)


    It seems as if WordPress only support one taxonomy. I can write domain.com/?mytaxonomy=mytaxonomyvalue and it wil automatically redirect to domain.com/mytaxonomy/mytaxonomyvalue/.

    I’m not sure why WordPress doesn’t support multiple taxonomies. When writing domain.com/?mytaxonomy=mytaxonomyvalue&anothertaxonomy=anothertaxonomyvalue it doesn’t redirect.

    I’m wondering if anyone have a solution on how to make SEO-friendly permalinks for multiple taxonomies. What I need:

    1) domain.com/?mytaxonomy=mytaxonomyvalue&anothertaxonomy=anothertaxonomyvalue should redirect to domain.com/mytaxonomy/mytaxonomyvalue/anothertaxonomy/anothertaxonomyvalue/ or something like that.

    2) domain.com/mytaxonomy/mytaxonomyvalue/anothertaxonomy/anothertaxonomyvalue/ should be a result of the matching taxonomies.

    What I’ve done so far is that I’ve read the documentation and I know that the solution for 1) involves the redirect_canonical filter as described in this post https://wp.tutsplus.com/tutorials/creative-coding/the-rewrite-api-post-types-taxonomies/.

    And the solution for 2) involves adding new rewrite rules using the rewrite_rules_array filter.

    But now I need some help on how to continue. Maby there is already a plugin that is doing this?

  • The topic ‘Redirect canonical and multiple taxonomies’ is closed to new replies.