Home › Forums › Support › Displaying pages and posts on author page This topic has 5 replies, 3 voices, and was last updated 4 years, 9 months ago by Tom. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts July 11, 2019 at 12:55 pm #955301 Rani Hi guys, Thanks for the great theme! I want to display both posts and pages on author pages. How can I do that? Thanks ahead, Rani July 11, 2019 at 1:46 pm #955356 LeoStaff Customer Support Hi there, Can you give Patrick solution in the page a shot? https://premium.wpmudev.org/forums/topic/author-archives-for-custom-post-types-resources Replace custom_type with page. July 12, 2019 at 2:17 am #955656 Rani Hi Leo, Thanks for the fast response. I tried Patrick solution, replacing custom_type with page, as you suggested, but it doesn’t seem to work. Any other suggestions? Thanks ahead, Rani July 12, 2019 at 9:24 am #956072 TomLead Developer Lead Developer Hi there, What about this?: add_action( 'pre_get_posts', function( $query ) { if ( ! $query->is_main_query() || is_admin() ) { return; } if ( $query->is_author ) { $query->set( 'post_type', array( 'post', 'page' ) ); } } ); July 12, 2019 at 10:48 am #956148 Rani Hi, Yes – That works just great. Thanks for the great support, as always! Best, Rani July 12, 2019 at 3:07 pm #956311 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In