‘catalogue’,
‘posts_per_page’ => -1,
‘post_status’ => ‘publish’,
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘post_parent’ => 0,
‘paged’ => $paged
);

$loop = new WP_Query( $args );
$posts = $loop->posts;

if (is_user_logged_in()){

foreach ($posts as $post){
$post_title = $post->post_title;
$post_content = $post->post_content;

echo $post_content.’
‘;
}

} else {
echo ‘You must be logged in to view this page.
‘;
echo ‘Login now‘;
}
wp_reset_query();
?>