Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'numberposts' => 10,
- 'offset' => 0,
- 'category' => 0,
- 'orderby' => 'post_date',
- 'order' => 'DESC',
- 'post_type' => 'post',
- 'post_status' => 'publish',
- 'suppress_filters' => true
- );
- $recent_posts = wp_get_recent_posts( $args, ARRAY_A );
- foreach ($recent_posts as $post) {
- $user_id = get_the_author_meta('ID', true) // is this correct
- // Is there a function that I need to pass the post ID ($post["ID"])?
- var_dump($user_id);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement