/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (is_page('pagename')) { query_posts('cat=yx') } ?> <!--or use query_posts like this:(full loop)--> <?php $displayposts = new WP_Query(); $displayposts->query('cat=5'); while ($displayposts->have_posts()) : $displayposts->the_post(); ?> <?php the_content('read more...'); ?> <?php edit_post_link('edit', '', ''); ?> <?php endwhile; ?>
Comments
