Home › Forums › Support › Issue generate_entry_meta_post_types and CPT This topic has 5 replies, 2 voices, and was last updated 3 years, 6 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts October 14, 2020 at 7:00 am #1488501 Beate Hello, I habe created Custom Post Type and output the entry meta with this function: add_filter( 'generate_entry_meta_post_types', function( $types ) { $types[] = 'entwickler-blog'; return $types; } ); Issue: The click on the author link leads to “404”, although the author had written several articles for this cpt. Can you help me please? Regards October 14, 2020 at 8:27 am #1488784 DavidStaff Customer Support Hi there, WP doesn’t display CPTs on author pages by default. Try the snippet Tom provides here to correct that: https://generatepress.com/forums/topic/displaying-pages-and-posts-on-author-page/#post-956072 October 15, 2020 at 2:33 am #1489938 Beate Hi David, thanks for the answer. I have inserted: add_action( 'pre_get_posts', function( $query ) { if ( ! $query->is_main_query() || is_admin() ) { return; } if ( $query->is_author ) { $query->set( 'entwickler-blog', array( 'post', 'page' ) ); } } ); The error is unfortunately still there. The link to the author still leads to 404. October 15, 2020 at 3:24 am #1490002 DavidStaff Customer Support This line is incorrect: $query->set( 'entwickler-blog', array( 'post', 'page' ) ); it should be: $query->set( 'post_type', array('custom_type', 'post') ); Change the custom_type to the your CPT slug. October 15, 2020 at 3:55 am #1490043 Beate My mistake is very embarrassing… Dear David, now it works and I am very grateful for your help!!! October 15, 2020 at 4:16 am #1490066 DavidStaff Customer Support No problems – glad to be of help! 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