/** * Display CPT on Recent Post widget * * @version WP 4.6.1 */ add_filter( 'widget_posts_args', 'knaeckebrot_widget_recent_post_4_cpt' ); function knaeckebrot_widget_recent_post_4_cpt( $params ) { $params['post_type'] = array( 'post', 'cpt01', 'cpt02'); return $params; }
Quelle: https://wordpress.stackexchange.com/questions/241060/display-custom-post-type-in-recent-posts