I have posts which i would like to put in to 3 categories News, Events, and Press Releases, then i have three pages which are using the same template. I would like to display those posts on to relevant pages so News posts on News page etc.
Could someone tell me what would be the best way to do that.
I guess its something easy but I’m fairly new to WordPress.
Many thanks,
You could simply use the category pages WordPress generates using the
category.php
template, orcategory-{slug}.php
. If you don’t like the /category/categoryname/ url format WP uses, there are a few plugins that remove the category base- I use Yoast SEO plugin for this, which gives you lots of other great features on top.Your other option is to create a special template for these pages with some additional code to load posts from your category. The WP Codex actually has exactly this code for you already, using a custom field on each page to designate which category you’d like it to load.