Advertisement
bowenac

Untitled

Sep 23rd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. $current_page_year = get_the_time('Y');
  2. $current_page_month = get_the_time('n');
  3.  
  4. var_dump($current_page_year);
  5. var_dump($current_page_month);
  6. /*Latest Featured post*/
  7. echo '<div class="newsletter-featured">';
  8.  
  9. $args = array(
  10.         'cat' => 13,
  11.         'year' => $current_page_year,
  12.         'monthnum' => $current_page_month,
  13.         'showposts' => 1,
  14.         'orderby' => 'date',
  15.         'order' => 'ASC',
  16.     );
  17. $lastposts = get_posts( $args );
  18. foreach ( $lastposts as $post ) :
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement