Guest User

Untitled

a guest
Jan 6th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $myposts = get_posts("numberposts=2&category=3");
  2. foreach($myposts as $post) : the_content(); endforeach;
  3.  
  4. query_posts("numberposts=2&category=3");
  5. while ( have_posts() ): the_post();
  6. the_content();
  7. endwhile;
  8.  
  9. the_post();
  10.  
  11. the_content();
  12.  
  13. <ul>
  14. <?php
  15. global $post;
  16. $myposts = get_posts('numberposts=5&offset=1&category=1');
  17. foreach($myposts as $post) :
  18. setup_postdata($post);
  19. ?>
  20. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  21. <?php the_content() ?>
  22. <?php endforeach; ?>
  23. </ul>
Add Comment
Please, Sign In to add comment