• Hi all,

    We’re trying to create URLs that are organised in the format below.

    https://www.example.com/taxonomy-child/post-name-post-id/

    We can get all the taxonomy area functioning ok in the WP admin area.

    We’ve set up a custom taxonomy for posts called ‘Page Classification’ and we’ve set up children ‘How To’, ‘News’, ‘Comment’.

    We can’t get the post permalink to show the taxonomy children slugs.

    e.g. https://www.example.com/how-to/post-name-post-id/

    I’ve been searching for hours on how to do this but can’t get it done. I’ve read through the codex pages on Taxonomies and register taxonomy function but can’t get the slug into the permalink.

    The rewrite rule in the register taxonomy function just seems to do nothing.

    How can we get the post permalink to use the taxonomy children slugs?

    Dave

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not sure if this will help you, but you might try declaring $wp_post_types as a global variable.

    Thread Starter davede

    (@davede)

    Thanks for the reply.

    Worth mentioning is that the new taxonomy is not part of a custom post type. it is just registering a new taxonomy for all posts.

    Would that make a difference?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use Taxonomy Slug In Post Permalink’ is closed to new replies.