I'm trying to show in a list page all the post that the current logged in user could have created in differents custom post type (5)

For exemple : the user makes a new post using a form using new_post.php and it's added in the WP custom-post-type 'Cookies' if it's what he selected from a dropdown list.

Then the user want to see his post so i'd list him all the post he made no matter what custom-post-type he posted to.

Thks in advance for the help

1 Answer 1


Try Below code.This will helpful

$user_id = get_current_user_id();
$args = array(
'author' => $user_id 
$query = new WP_Query( $args ); 
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();

  // Do Stuff
  • Thks! I'll give it a try
    – pouki
    Oct 10, 2013 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.