WordPress.org

Ready to get started?Download WordPress

Forums

Custom Taxonomy Permalink Issues! (3 posts)

  1. fcarthy
    Member
    Posted 3 years ago #

    I've been looking around but I can't seem to find the answer. I have two custom taxonomies for my custom post type. One is hierarchal and used as categories, the other is not and used as tags.

    This is my code:

    add_action( 'init', 'build_taxonomies', 0 );
    
    function build_taxonomies() {
        register_taxonomy( 'type', 'clipping', array( 'hierarchical' => true, 'label' => 'Clipping Category', 'query_var' => true, 'rewrite' => true ) );
    
    }
    
    add_action( 'init', 'tag_taxonomies', 0 );
    
    function tag_taxonomies() {
        register_taxonomy( 'tag', 'clipping', array( 'hierarchical' => false, 'label' => 'Clipping Tags', 'query_var' => true, 'rewrite' => true ) );
    
    }

    The strange thing is that on my blog, if I click on a category for any post, for example 'print', I'm correctly taken to the corresponding page:
    example.com/type/print

    If I click on a tag, for example "resumes", I'm taken to this:
    example.com/tag/resumes
    HOWEVER, it's a 404. I've tried checking my permalink settings, which I'm guessing that's what it has to do with, but I can't figure out why one works and the other doesn't.

    Any ideas?

  2. Gisha James
    Member
    Posted 3 years ago #

    tag is a reserved word. Replace it with some other unreserved words and check if that is the issue.

    http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms

  3. fcarthy
    Member
    Posted 3 years ago #

    That was exactly the problem. Thanks for taking me back to WP 101!!

Topic Closed

This topic has been closed to new replies.

About this Topic