WordPress.org

Forums

Stargazer
[resolved] Custom Category Template (9 posts)

  1. R_Steffens
    Member
    Posted 1 year ago #

    Hello, i am trying to create a custom category page, but i can't get it to work, and do not find the normal category template either

    /Robert

  2. stephencottontail
    Member
    Posted 1 year ago #

    What steps have you tried? Also, you may wish to check out Template Hierarchy so you can make sure you're looking for the right file.

  3. R_Steffens
    Member
    Posted 1 year ago #

    Yes, i have done this several times before on other themes

  4. stephencottontail
    Member
    Posted 1 year ago #

    What is your custom category page called? Can you post the contents of this file to Pastebin and post the link here? What do you mean by, "can't get it to work"?

  5. R_Steffens
    Member
    Posted 1 year ago #

    As i said i have used the same code several times before.

    http://pastebin.com/vizvnj5B

  6. stephencottontail
    Member
    Posted 1 year ago #

    What is the filename of the file you posted?

  7. R_Steffens
    Member
    Posted 1 year ago #

    category-25.php

  8. stephencottontail
    Member
    Posted 1 year ago #

    After some digging, I figured it out. Stargazer overrides WordPress' default template hierarchy, so you can't use the normal file names. Instead, the file name must be taxonomy-category-{slug}.php. To find out what to use for {slug}, go to your Dashboard and then go to Posts > Categories. Your categories will be listed in alphabetical order and the slug will be listed under the heading "Slug".

  9. R_Steffens
    Member
    Posted 1 year ago #

    Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.