หน้า 1 จากทั้งหมด 1

สอนสร้าง Plugin WordPress (12) : ตัวอย่างการสร้าง Custom Post Types

โพสต์แล้ว: 25/10/2016 12:02 pm
โดย thatsawan

โค้ด: เลือกทั้งหมด

//create_post_type
add_action( 'init', 'create_post_type' );
function create_post_type() {
  register_post_type( 'type_post_product',
    array(
      'labels' => array(
        'name' => __( 'Products Demo' ),
        'singular_name' => __( 'Product Demo' )
      ),
      'public' => true,
      'has_archive' => true,
    )
  );
}
 
ผลที่ได้
รูปภาพ
รูปภาพ
รูปภาพ

ศึกษาเพิ่มเติมได้ที่นี่
https://codex.wordpress.org/Function_Re ... _post_type

Re: สอนสร้าง Plugin WordPress (12) : ตัวอย่างการสร้าง Custom Post Types

โพสต์แล้ว: 25/10/2016 9:49 pm
โดย mindphp
รวมกระทู้ บทความสอนสร้าง Plugin WordPress
https://www.mindphp.com/forums/viewtopic ... 25&t=36079