wordpressを移行するときにさくらインターネットから
NTTCommunications のBizメール&ウェブ プレミアムのサーバーにデータとデータベースを移したとき
500エラーが出てしまい。
wp-config.phpにdefine('WP_DEBUG', true);を追加してあげてみましたら
Parse error: syntax error, unexpected '[' in /home/pro2root/www/exsample.co.jp/recruit/wp-content/themes/exsample-recruit/functions.php on line 206
と表示されました。
エラーの箇所はカスタム投稿タイプの$exampleSupportsの部分でした。
// カスタム投稿タイプ作成 function create_post_type() { $exampleSupports = [ 'title', 'editor', 'thumbnail', 'revisions' ]; // add post type register_post_type( 'member', array( 'label' => 'メンバー紹介', 'public' => true, 'has_archive' => true, 'menu_position' => 2, 'supports' => $exampleSupports ) ); // add taxonomy register_taxonomy( 'member_taxonomy', 'member', array( 'label' => '所属グループ', 'labels' => array( 'all_items' => '所属グループ一覧', 'add_new_item' => '所属グループを追加' ), 'hierarchical' => true ) ); } add_action( 'init', 'create_post_type' );
ここのどこにエラーの原因があるのかよくわらず、これを外すとカスタム投稿がなくなってしまします。
エラーの原因
もしくは違う回避の方法があればご回答願いたいです。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/08 03:45