Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $args = array(
  2. 'numberposts' => 10,
  3. 'offset' => 0,
  4. 'category' => 0,
  5. 'orderby' => 'post_date',
  6. 'order' => 'DESC',
  7. 'post_type' => 'post',
  8. 'post_status' => 'publish',
  9. 'suppress_filters' => true
  10. );
  11.  
  12. $recent_posts = wp_get_recent_posts( $args, ARRAY_A );
  13.  
  14. foreach ($recent_posts as $post) {
  15. $user_id = get_the_author_meta('ID', true) // is this correct
  16. // Is there a function that I need to pass the post ID ($post["ID"])?
  17. var_dump($user_id);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement