WordPress.org

Ready to get started?Download WordPress

Forums

taxonomy permalinks (6 posts)

  1. duncmorley
    Member
    Posted 3 years ago #

    I have a website set up with the permalink structure set up with /blog/%postname%/

    I have created a custom post type called 'portfolio' and the permalinks work correctly until I start using a custom taxonomy I have created called 'clients'. The permalink it creates for my custom taxonomy is /blog/clients/client-name/.

    Can anyone help me solve this issue. Ideally the permalink for my custom taxonomy should be /portfolio/clients/client-name/

  2. jevets
    Member
    Posted 3 years ago #

    Set the taxonomy argument with_front to false. If this argument is true (by default), then WP will use the prefix set in your permalinks. Set it to false to get /clients/client-name. Use a combination of the args to achieve /portfolio/clients/client-name

    See http://codex.wordpress.org/Function_Reference/register_taxonomy

  3. jevets
    Member
    Posted 3 years ago #

    Also, be sure to visit your permalinks settings to flush the rewrite rules.

  4. duncmorley
    Member
    Posted 3 years ago #

    Not sure if I completely understand what you mean by:

    Use a combination of the args to achieve /portfolio/clients/client-name

    What args should I use to achieve this?

  5. duncmorley
    Member
    Posted 3 years ago #

    Also, when clicking on the client name, I want it to go to it's own templated archive page. At the minute it uses the default blog archive page. Any ideas on how to make it use it's own?

  6. duncmorley
    Member
    Posted 3 years ago #

    I worked out that having a page called taxonomy-{taxonomy name}.php in your theme folder works for that.

    Actually, looking at it now, I ideally don't want it to say clients in the URL at all. Just 'portfolio/client-name'. But changing the slug to portfolio gives me a 404 error :(

Topic Closed

This topic has been closed to new replies.

About this Topic