• Resolved wrimomatt

    (@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.

    Ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Thread Starter wrimomatt

    (@wrimomatt)

    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?

    Thread Starter wrimomatt

    (@wrimomatt)

    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.