[insert_php]
if ( is_user_logged_in() ):
global $current_user;
wp_get_current_user();
$author_query = array(
‘posts_per_page’ => ‘-1’,
‘author’ => $current_user->ID,
‘post_type’=>’Directory’
);
$author_posts = new WP_Query($author_query);
while($author_posts->have_posts()) : $author_posts->the_post();
?>
endwhile;
else :
echo “not logged in”;
endif;[/insert_php]