Advertisement
Guest User

Untitled

a guest
Sep 6th, 2015
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $args = array(
  4.     'posts_per_page' => 6
  5. ) ;
  6. $my_query = new WP_Query($args) ;
  7. $posts_array = get_posts($args) ;
  8.  
  9.  
  10. $myposts = get_posts( $args );
  11. foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
  12.  
  13.         <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  14.  
  15. <?php endforeach;
  16. wp_reset_postdata();?>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement