if ( is_user_logged_in() ): global $current_user; get_currentuserinfo(); $author_query = array('posts_per_page' => '-1','author' => $current_user->ID); $author_posts = new WP_Query($author_query); while($author_posts->have_posts()) : $author_posts->the_post(); ?>