前提・実現したいこと
色々なエラーを改善しているうちに、投稿画面からカテゴリーとタグの選択肢が消えていることに気づきました。
現在WPのバージョンは5.1で新しい編集画面を使っています。
旧投稿画面に戻すと表示されます。
Gutenbergはエラーを起こすので、削除しました。
新投稿画面でも、カテゴリーとタグの選択肢を表示させたいです。
何卒よろしくお願いいたします。
発生している問題・エラーメッセージ
エラーメッセージも出ておりませんが、
重複クエリがあると、Query Monitorで表示されます。
※追記02&一部のカテゴリーのリンク切れ改善※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
Query Monitorで、機能していないカテゴリーをクリックしたところ、
wp-cron.php
がエラーになりました。下記が、ダッシュボード中に表示されるエラーコードです。APIに問題があるということでしょうか。
Certificate verification disabled (sslverify=false) https://○○○○/wp/wp-cron.php ?doing_wp_cron=1550809778.4984641075134277343750
→パーマリンクの問題でしたので、カテゴリーベースを別の名前で更新したところ、改善されました。
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
エラーが出る直前に行った実装:個別Javascript読み込みフォームの挿入をfunctions.phpに記述
下記がコードです。
//Custom JavaScript Widget add_action('admin_menu', 'custom_js_hooks'); add_action('save_post', 'save_custom_js'); add_action('wp_head','insert_custom_js'); function custom_js_hooks() { add_meta_box('custom_js', '個別JavaScript', 'custom_js_input', 'post', 'normal', 'high'); add_meta_box('custom_js', '個別JavaScript', 'custom_js_input', 'page', 'normal', 'high'); } function custom_js_input() { global $post; echo '<input type="hidden" name="custom_js_noncename" id="custom_js_noncename" value="'.wp_create_nonce('custom-js').'" />'; echo '<textarea name="custom_js" id="custom_js" rows="5" cols="30" style="width:100%;">'.get_post_meta($post->ID,'_custom_js',true).'</textarea>'; } function save_custom_js($post_id) { if (!wp_verify_nonce($_POST['custom_js_noncename'], 'custom-js')) return $post_id; if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id; $custom_js = $_POST['custom_js']; update_post_meta($post_id, '_custom_js', $custom_js); } function insert_custom_js() { if (is_page() || is_single()) { if (have_posts()) : while (have_posts()) : the_post(); if (get_post_meta(get_the_ID(), '_custom_js', true) !='') { echo "<script type=\"text/javascript\">\n".get_post_meta(get_the_ID(), '_custom_js', true)."\n</script>\n"; } endwhile; endif; rewind_posts(); } }
試したこと
投稿画面の旧新切り替え
疑わしきプラグインの停止・有効切り替え
下記がインストール済みのプラグインです。
Classic Editor(停止中)
Easy FancyBox(有効)
Enable Shortcode and PHP in Text widget(有効)
Google Tag Manager for Wordpress(有効)
Query Monitor(有効)
Really Simple SSL(停止)※停止中もSSLを維持に設定
Scheduled Post Trigger(有効)
Shortcodes Ultimate(有効)
WP Multibyte Patch(有効)
wp_head() cleaner(有効)
Simple Custom CSS&JS(削除済み)

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/22 01:09
2019/02/22 03:02
2019/02/22 03:07 編集
2019/02/22 03:30
2019/02/22 03:35
2019/02/22 03:38
2019/02/22 03:51 編集
2019/02/22 03:58
2019/02/22 04:07
2019/02/22 05:42
2019/02/22 06:51 編集
2019/02/22 07:05