What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?

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/

Read More

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

Related posts

Leave a Reply

1 comment

  1. It’s very likely that blank white page is actually caused by a fatal error on one of your templates. You should enable PHP’s error debugging during development to help track down these issues.

    You should be able to enable errors with php by creating a file php.ini in the root directory of wordpress install. The php.ini file should read

    error_reporting E_ALL
    display_errors On
    

    I believe the template you’d want, to target that archive specifically, would be archive-legacy-posts.php, though you could also try category-legacy-posts.php. Please note, in either of these, after archive or category the slug should follow.