• Let’s say my client will be adding a category (through a custom taxonomy called ‘Location’) called ‘Greater Manchester’.

    I’m wondering if there is a way I can set up the taxonomy so that, rather than setting the slug as ‘greater-manchester’ it adds a prefix to it automatically, something like:
    ‘top-greater-manchester’

    Is this possible through the way the taxonomy is configured in functions.php?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can do this by creating rewrite rules.
    Take a look here.

    Thread Starter 000000000

    (@pealo86)

    Thanks. The main reason for adding the prefix however is so that WP doesn’t add a number at the end of any duplicate taxonomies.

    I’m not sure rewrite rules would solve that though?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a prefix to taxonomy slugs’ is closed to new replies.