Support » Everything else WordPress » page template to archive

  • Resolved wrimomatt


    I have a custom page template built that works for a specific category, but I want to build a custom archive to do the same thing. I essentially want to be able to display all of the posts in a particular category in a particular way. I can accomplish the same thing by making the page display unlimited posts, but an archive would be more direct.

    I’ve built a few archives, but no matter what I do everything just uses the default arhive.php file.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    Try using category-id.php

    So if your category is id = 3, just make a category-3.php

    I find category.php templates easier to work with.

    I love me some IDs, but trying to ween myself off them because they change from development to deployment. would category-slug.php work the same way?

    Christine Rondeau


    Volunteer Forum Moderator

    According to this diagram –
    It would.

    thanks. problem solved!

    I was staring at the hierarchy earlier and couldn’t for the life of me figure out why it wasn’t working. I had no generic category.php file, just an archive.php. So I copied my archive to create a generic category.php (thinking how could I have a custom version of something that didn’t exist) and presto! the other custom templates started working!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘page template to archive’ is closed to new replies.