WordPress.org

Ready to get started?Download WordPress

Forums

Custom post types and categories (5 posts)

  1. neologan
    Member
    Posted 2 years ago #

    I've got most of what i need sorted out, but, you know how you get category.php pages from posts, like:

    http://www.site.net/category/reviews/

    and then it lists all posts in the category "reviews". How do you get this kind of behaviour from a custom post type?

    I have taxonomy already there for the CPT, just don't know how to display it like the normal posts as above.

  2. wprock
    Member
    Posted 2 years ago #

    create a new file single-{posttype}.php and copy the code from index.php and paste there.

  3. neologan
    Member
    Posted 2 years ago #

    single.php is for changing the template for single posts, why would that help me get the page I would want as shown above?

  4. wprock
    Member
    Posted 2 years ago #

    "review" is a taxonomy here?

  5. wprock
    Member
    Posted 2 years ago #

    taxonomy.php
    taxonomy-{taxonomy}.php
    taxonomy-{taxonomy}-{term}.php

    if review is a taxonomy then create this taxonomy-{taxonomy}.php and paste the code from archive.php or category.php file

Topic Closed

This topic has been closed to new replies.

About this Topic