WordPress.org

Ready to get started?Download WordPress

Forums

Category & Tag template best practices (6 posts)

  1. get_username
    Member
    Posted 1 year ago #

    I'm at the point where I have my custom page template to display all of my posts, but I'm now at the point where I'm trying to figure out the best way to filter posts by category and tag.

    For my blog posts I have about 10 categories and 10 tags.

    For my custom post type I have 4 categories.

    How should I proceed in filtering when a user clicks on a link? It currently defaults to index. I'm aware that I can make category.php and tag.php, but is that the correct way to display multiple categories and tags, or do I need to create a custom page like category-categoryname.php for each category?

  2. get_username
    Member
    Posted 1 year ago #

    I should have noted the archive.php page. Is that something I should use for filtering all categories and tags? I hesitate because I have blog posts, and then I have custom post type posts.

  3. get_username
    Member
    Posted 1 year ago #

    I personally went ahead and made a category.php page and tag.php page for my standard posts which seem to work. The custom post type appears to be a little trickier. For some reason my taxonomy.php template is not recognized like the others. It sure would be nice to get other users opinions on this.

  4. Dave
    Member
    Posted 1 year ago #

    "For some reason my taxonomy.php template is not recognized like the others."

    Try this post: http://wordpress.org/support/topic/taxonomy-template-file-in-custom-theme?replies=13 - scroll down to the post by Rev. Voodoo

  5. get_username
    Member
    Posted 1 year ago #

    Thanks, RoseAndMoon, I've tried what they mentioned in that post. I have taxonomy-testimonial.php as my template, but it skips right to the index.php file. My registered taxonomy is of course "testimonial."

  6. Dave
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.