Posted By

zartgesotten on 06/27/09


Tagged

hack wordpress category theme


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

irishsk
joelhaus
BoNzO


Wordpress display content of a category on a page


 / Published in: PHP
 

  1. <?php if (is_page('pagename')) { query_posts('cat=yx') } ?>
  2.  
  3. <!--or use query_posts like this:(full loop)-->
  4.  
  5. <?php
  6. $displayposts = new WP_Query();
  7. $displayposts->query('cat=5');
  8. while ($displayposts->have_posts()) : $displayposts->the_post();
  9. ?>
  10. <?php the_content('read more...'); ?>
  11. <?php edit_post_link('edit', '', ''); ?>
  12.  
  13.  
  14. <?php endwhile; ?>

Report this snippet  

You need to login to post a comment.