Get all custom post types excepted some…
Following code generates the array to use as argument. <?php // Excluded CPTs. You can expand the list. $exclude_cpts = array( ‘portfolio’ ); // Builtin types needed. $builtin = array( ‘post’, ‘page’, ‘attachment’ ); // All CPTs. $cpts = get_post_types( array( ‘public’ => true, ‘_builtin’ => false ) ); // remove Excluded CPTs from All … Read more