I have a custom post type called lessons. And when I go the author page of these post types, it does not show these posts all says no posts found.
After doing some search on the forums I have added the below to the functions.php in my child theme
add_action( 'pre_get_posts', 'enfold_customization_author_archives' );
function enfold_customization_author_archives( $query ) {
if ( $query -> is_author ) { $query -> set( 'post_type', 'any' ); }
remove_action( 'pre_get_posts', 'enfold_customization_author_archives' );
}
Even then its still says no posts found when I know there many posts.
What am I missing?
Thanks
Any idea why this is happening. I am stuck currently with this issue.
Thanks