I want to create a page where I can edit stuff on the top part of the page and then have all the posts from a selected category show up. Is there something simple I can just insert like {Category=x}
I want to create a page where I can edit stuff on the top part of the page and then have all the posts from a selected category show up. Is there something simple I can just insert like {Category=x}
<?php
$sel_cat_id = 6;
$sel_cat_posts = new WP_Query('cat='.$sel_cat_id.'&posts_per_page=-1');
while($sel_cat_posts->have_posts()): $sel_cat_posts->the_post();
?>
<?php the_title(); ?> <br/> <br/>
<?php the_excerpt();?>
<?php endwhile;?>
Use this code and add design functionality.
This topic has been closed to new replies.