Hi!
How do I create a new page to ONLY display one category of Posts? The category is called “Articles” and the category ID is 507.
I tried this but didn’t get very far. These are the steps I took:
1. Copied the Page Template (page.php) and called it articles.php
2. Added this line to the top of the file <?php /* Template Name: Article Page */ ?>
3. Added this code to the middle of the file to display only posts with category ID 507:
<?php
query_posts(‘cat=507’);
while (have_posts()) : the_post();
the_content();
endwhile;
?>
3. Created a new page called “Articles” and selected the template called “Article Page”
The problem is, the Articles page is not formatted like the Blog page (missing the title of the post with URL, date published, author, blog sidebar (even though I selected it in the Articles Page to show), etc…
Here is our blog page: http://bit.ly/HFDMyk
Here is our articles page: http://bit.ly/HLsmts
Thanks in advance for your time and help!
Hi goldsport!
Have you tried using the Blog Posts element with setting like this (selecting the category in question)?
Best regards,
Josue
Thank you Josue that worked!!
Glad we could help, let us know if you have any more questions or issues :)
Regards,
Josue