Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1204216

    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

    #1204549

    Any idea why this is happening. I am stuck currently with this issue.

    Thanks

    #1205477

    Hi,

    Thank you for the inquiry.

    Where can we see the issue? We can’t seem to reproduce it on our end, so it’s possible that the issue is cause by a plugin or a custom snippet in the functions.php file. Have you tried to temporarily deactivate the plugins?

    Best regards,
    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.