Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Custom post types and Categories/Tags

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29619
    jamygolden
    Member

    I’ve created a custom post type called "Shoes", and I’ve allowed users to tag and categorize the shoe posts. The only problem is when I click on the tag or category that is dynamically added under the Shoe article (Like a normal post) it links me to a tag or category page without any shoes being displayed.

    So basically, it only displays posts that are published under the default wordpress ‘Posts’ page (In the backend).

    Does anyone have any ideas on how to go about displaying the ‘Shoes’ posts labeled with these tags aswell?

    This is the ‘shoes’ code under my functions.php, I’m not sure if it is of any use or not:

    Code:
    function create_my_post_types() {
    register_post_type( ‘shoe’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Shoes’ ),
    ‘singular_name’ => __( ‘Shoe’ ),
    ),
    ‘_builtin’ => false,
    ‘public’ => true,
    ‘hierarchical’ => false,
    ‘taxonomies’ => array( ‘category’, ‘post_tag’),
    ‘supports’ => array(‘title’,’editor’,’author’,’thumbnail’,’excerpt’,’comments’
    ),
    ‘rewrite’ => array( ‘slug’ => ‘shoe’, ‘with_front’ => false ),
    )
    );
    }
    add_action( ‘init’, ‘create_my_post_types’ );
    #79793
    jamygolden
    Member

    I’ve found a solution, but if anyone finds an answer to this, please let me know.
    I’ve noticed that this problem doesn’t occur with custom taxonomies, only the default post-tags and categories. So I’ve created a custom taxonomy and named it ‘Tags’ :lol:

    #79841
    TheDoc
    Member

    Hmmmmm, I feel like you’re just missing a step, but I haven’t run into this myself yet so I can’t help you. I’ll see what happens as I do more work with 3.0.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.