Hello. I created some pages in WordPress and now i want to add post from specified categories but i cant get it to work. As an example my site: www.net-flux.com You can see that the page News is empty while the category news has some random posts i put. How do i link categories/posts to pages? Thank you.
There are three ways you can do this. The easiest way is to just use a plugin, like Page Links To or Page2Cat The second way is to write a page template, which is good if you don't like using plugins. Wordpress - Creating Your Own Page Templates Copy your page template (page.php) and rename it to news.php, or whatever you think is appropriate. Just make sure it's not a reserved filename. Open it in the theme editor and put the template comments at the top. Then, put a query_posts line just before the loop starts. It should look something like this: <?php /* Template Name: News */ ?> <?php get_header(); ?> <div id="container"> <div id="content" role="main"> <?php query_posts('cat=57'); ?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> Code (markup): Then, edit your news page and select the news template from the drop-down box on the right side. If you make another template, change the template name and the category ID (cat=57) to the right ones. The third ways is to install a PHP plugin and use the get_posts function directly in the page content, but I wouldn't bother doing that.