WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This may be a weird scenario, but...I have a custom post type called Resources. When visiting /resources/ I get the archive as expected. What I want is a text describing this post type. Therefore I've made a page with the exact name and path. If I now go to /resources/ I still get the archive page, which is good. So, I created a custom template (archive-resources.php) and from there I searched pages with the same path and then I find my page and is able to write out the text before listing the archive.

What I want to know is that, is this a good way to solve my problem? if not, how can I make it better?

share|improve this question
I'm not sure why you need/want to introduce a static Page into this scenario at all. Is there any problem with merely using archive-resources.php to display the "Resources" archive index, with descriptive text? – Chip Bennett Jan 24 '12 at 16:05
Well the problem is that you can't set a description for a post type. I'm not going to hard code it in the template for obvious reasons. – tbleckert Jan 25 '12 at 14:04
What are the "obvious reasons" for not hard-coding a custom post-type specific description into a custom post-type specific template file? – Chip Bennett Jan 25 '12 at 14:07
First, my site is multilingual, long texts like that shouldn't be translated that way. Second, I'm not the editor and I'm pretty sure the easiest way for the editor to change that text is to do it in the admin. – tbleckert Jan 26 '12 at 10:44
up vote 2 down vote accepted

I don't see anything wrong with using archive-$cpt_name.php as your default archive page for the custom post type. That would be the correct way to go about doing it. Although there are many different methods to do it, I think you are on the right track to the best way.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.