カスタム投稿の個別ページが404エラーになる。
-
お世話になっております。
タイトルの通りなのですが、カスタム投稿の個別ページを表示すると
「ページが見つかりません」の404エラーになります。カスタム投稿はプラグインを使わず、functions.phpに以下のように書いてます。
function lineupitems_custom_post_type() {
$labels = array(
‘name’ => ‘商品ラインナップ’,
‘singular_name’ => ‘商品ラインナップ’,
‘add_new_item’ => ‘商品ラインナップを追加’,
‘add_new’ => ‘新規追加’,
‘new_item’ => ‘新規商品ラインナップ’,
‘view_item’ => ‘商品ラインナップを表示’,
‘not_found’ => ‘商品ラインナップは見つかりませんでした’,
‘not_found_in_trash’ => ‘ゴミ箱にお商品ラインナップはありません’,
‘search_lineupitems’ => ‘商品ラインナップを検索’,
);
$args = array(
‘labels’ => $labels,
‘public’ => true,
‘show_ui’ => true,
‘query_var’ => true,
‘hierarchical’ => false,
‘menu_position’ => 5,
‘has_archive’ => true,
‘supports’ => array(‘title’,’editor’,’author’,’thumbnail’,’comments’) );
register_post_type(‘lineupitems’, $args);$args = array(
‘label’ => ‘カテゴリー’,
‘public’ => true,
‘show_ui’ => true,
‘hierarchical’ => true );register_taxonomy(‘lineupitems_category’,’lineupitems’,$args);
$args = array(
‘label’ => ‘タグ’,
‘public’ => true,
‘show_ui’ => true,
‘hierarchical’ => false );register_taxonomy(‘lineupitems_tag’,’lineupitems’,$args);
}
add_action(‘init’, ‘lineupitems_custom_post_type’);いつもCPIのサーバーを使用しているときはこれで問題ないのですが、
404エラーになるのはさくらインターネットのサーバーです。どなたかおわかりの方がいらっしゃいましたらよろしくお願いします。
トピック「カスタム投稿の個別ページが404エラーになる。」には新たに返信することはできません。