I am creating a custom author.php page and on that page I want to have different areas where I can display custom post types (cpt). So in one area I will display the cpt 'blogs', in another area the cpt 'audio' and in another area cpt 'video', etc. -- but all for one author -- say by Albert Einstein, and on his author page.
Ideally, each loop would be conditional so that when there was no cpt, say for 'video' or 'blogs', nothing would display.
I have looked around but cannot find code that works for me. If anyone can help provide code for looping at least one of these cpt's that would be very helpful. Thank you! Here is the code that I am using -- for some reason it is not calling the ctp so no posts are appearing on the page:
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
query_posts( array(
'post_type' => array('video'),
'author' => $author,
'posts_per_page' => 10 )
);
?>