サイトで投稿するのは、通常の投稿ではなくカスタム投稿タイプだけなのです。
なので、下記のように「カスタム投稿タイプの名前(customtype)」はいりません。
http://example.com/customtype/test
下記のように、「投稿名(test)」だけでいいんです。
http://example.com/test
いったいぜんたい、どうすればいいのでしょうか?
かなりの素人なのですが、お詳しい方、何卒よろしくお願いいたします。m(__)m
尚、現在のfunctions.phpは、下記のように書いてあります。
php
1// カスタム投稿タイプの追加 2add_action( 'init', 'custum_post_type' ); 3function custum_post_type() { 4 //カスタム投稿1追加 5 register_post_type( 'customtype', 6 array('labels' => 7 array( 8 'name' => __( 'customtype' ), 9 'singular_name' => __( 'customtype' ) 10 ), 11 //投稿タイプの設定 12 'public' => true, 13 'menu_position' => 5, 14 'hierarchicla' => false, 15 'has_archive' => true, 16 17 //投稿編集ページの設定 18 'supports' => array('title','editor','thumbnail', //タイトル,編集,アイキャッチ 19 'custom-fields','excerpt','author','trackbacks', //カスタムフィールド,抜粋文&作成者,トラックバック 20 'comments','revisions','page-attributes') //コメント,リビジョン,作成者,表示順のボックス 21 ) 22 );
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/09/20 10:45