Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am pretty new in WordPress theme development and I have the following doubt.

I am working on this custom theme: http://lnx.asper-eritrea.com/

Into this website upper horizontal main menu I have a link named LEGACY-POSTS (the last one) that should show the list of all the posts belonging to a specific category (named legacy-posts).

Clicking on this link I obtain a white empty page: lnx.asper-eritrea.com/category/legacy-posts/

I think that it could depend by the fact that maybe I have to implement this page. Is it right?

I was looking on the Template Hierarchy official WordPress documentation page: http://codex.wordpress.org/Template_Hierarchy

But I am finding some difficulties to understand what name I have to use for the file that implement this page.

Can you help me?

Tnx

share|improve this question
    
Do you have archive.php or category.php in your theme which is empty? –  bravokeyl Jul 26 at 16:44
    
yes, these 2 files are empty –  AndreaNobili Jul 26 at 16:45
    
it seems you have archive.php in the theme which is empty.Am i correct? –  bravokeyl Jul 26 at 16:45
1  
category.php file is used to render posts belonging to specific category.since it is empty ..you are getting a blank page –  bravokeyl Jul 26 at 16:46

1 Answer 1

up vote 1 down vote accepted

A custom template for one specific category should be named category-slug.php where "slug" is the WP slug for the category. WordPress will automatically use this file to display the archive for that one category.

You could also name it using the ID of the category.

If your category is "legacy-posts", then your template file should be named category-legacy-posts.php.

share|improve this answer

Your Answer

 
discard

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.