Tell us what you are trying to do?
I am busy developing a Pet listing site and need to show an Author Profile link on a single listing post. When you click on the link, it should show you the details about the auhor and I would like to list all the authors listings in his profile. I did create a new Archive template and assigned the Author Archives to it. When I view the front end, its says "No items fount". I'ts as if the Author Archives is not registering the content?
By default, the author archive page only shows the results from the "Posts" post type.
To include the results from other custom post types too, you can use the "pre_get_posts" hook.
For example, suppose you have a custom post type with slug "find-a-pet" that you'd like to include these posts in the results shown on the author archive page. The code, in this case, would look like this:
function custom_set_post_types_author_archives($query) {
// if author archive page
if ( (!is_admin()) && (is_author()) )
// include selected post types in results
$query->set( 'post_type', array('find-a-pet', 'post') );
remove_action( 'pre_get_posts', 'custom_post_author_archive' );
}
add_action('pre_get_posts', 'custom_set_post_types_author_archives');