How to show cutom post labels in options?
You just need to pull the Labels via get_post_type_object(); <?php $args=array( ‘public’ => true, ‘_builtin’ => false ); $output=”names”; $operator=”and”; $post_types=get_post_types($args,$output,$operator); ?> <select id=”” name=””> <?php foreach ($post_types as $post_type ) { $label_obj = get_post_type_object($post_type); $labels = $label_obj->labels->name; ?> <option <?php selected( $instance[‘posttype’], $post_type ); ?> value=”<?php echo $post_type; ?>”><?php echo $labels; ?></option> <?php } … Read more