Get all current post type in wordpress website, modify the code to suit your needs
Lấy tất cả post type trong wordpress website, chỉnh code lại cho phù hợp nhu cầu của anh chị nhé
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  | 
						 <?php $args = array( 'public' => true, ); $post_types = get_post_types($args);  ?> <div class="form-group">             <div class="row">                 <div class="col-md-4 col-sm-12"><label><?php _e( 'Apply for which post type?','euproseo' ); ?></label></div>                 <div class="col-md-8 col-sm-12">                 <select name="eupro_seo[CreativeWorkSeries_posttype][]" id="eupro_seo_CreativeWorkSeries_posttype" class="form-control-sm" multiple="multiple" style="min-height: 120px;" >                    <?php                     foreach ($post_types as $key=>$value): 						if(in_array($key,$CreativeWorkSeries_posttype)){ 							$selected='selected="selected"'; 						}else{ 							$selected=''; 						}                         printf( '<option value="%1$s" %2$s>%3$s</option>', $key, $selected,$value );                     endforeach;                     ?>                 </select>                 </div>             </div>         </div>  | 
					
Mọi sự sao chép xin ghi rõ nguồn là fcwordpress.net
Chuyên trang về wordpress: hướng dẫn thiết kế theme, plugin, thủ thuật wordpress
Chili Comment. Giấy phép không hợp lệ. Kích hoạt tại đây