0

I am learning WordPress Plugin Development. How can I make Mandatory Fields in Custom Post ?

enter image description here

2
  • 1
    What method or plugin are you using for creating custom fields for this custom post type?
    – Jeff Cohan
    Commented Aug 30, 2022 at 17:23
  • Thanks @JeffCohan. I am using this code public function register_custom_post_type() { $supports = ['title']; $labels = [ 'name' => __( 'News', 'wpwi' ), 'singular_name' => __( 'News', 'wpwi' ), 'name_admin_bar' => __( 'News', 'wpwi' ) ];$args = [ 'public' => false, 'show_ui' => true,'supports'=> $supports, 'labels' => $labels, 'public' => true,'description' => 'News', 'has_archive' => true,'exclude_from_search' => false, ]; register_post_type( 'news', $args ); }
    – Foysal
    Commented Oct 17, 2022 at 2:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.