プロフィール
とん吉
とん吉
はじめまして、とん吉でぅ。

とん吉ブログを読んでいただき、まこちにありがとうごじます。
< 2025年05月 >
S M T W T F S
        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 26 27 28 29 30 31
オーナーへメッセージ

WP|カスタム投稿の用意

2012年09月04日
プラグインは使わず、現在のテーマのfunction.phpに下記を追記。(かなり簡単に…)

<?php
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'bland',
array(
'labels' => array(
'name' => __( 'ブランド' ),
'singular_name' => __( 'ブランド' )
),
'public' => true,
'has_archive' => true,
'menu_position' => 100,
)
);
}
?>

これで左メニューにブランドというリンクができます。

下記サイトより引用
http://8works-web.com/2011/06/29/wordpress_register_post_type_custom_field_template/

グリコネットショップ     


同じカテゴリー(WordPress)の記事
 Custom Fields Searchとカスタム投稿 (2012-09-06 15:59)
 WP|Contact form 7へタイトルを自動表示させる (2012-09-06 11:45)
 WP|カスタムフィールドテンプレート カテゴリー分け (2012-09-04 14:56)
 WordPress|記事内の一枚目の画像を取得する (2012-08-28 13:25)

Posted by とん吉 at 15:43│Comments(0)WordPress
 
<ご注意>
書き込まれた内容は公開され、ブログの持ち主だけが削除できます。

削除
WP|カスタム投稿の用意
    コメント(0)