WP カスタム投稿タイプを追加するfunctions.phpの書き方
/* カスタム投稿タイプの追加 */add_action( 'init', 'create_post_type' );function create_post_type() { register_post_type( 'products', /* post-type */ array( 'labels' => array( 'name' => __( '商品' ), 'singular_name' => __( '商品' ) ), 'public' => true, 'menu_position' =>5, ) );}※商品となっているところは、好きなものに変更してください!
関連記事はこちら!
スポンサーリンク
タグ:functions.php, カスタム投稿, カスタム投稿タイプ






