採用サイト制作に最適なWordPressテーマ「ISSUE」の機能概要

ワードプレステーマ別

TCDテーマGENSEN:カスタム投稿タイプの記事編集画面にカスタムCSS入力欄を追加する方法

Q.通常投稿(ブログ)と固定ページの記事編集画面にある「カスタムCSS」入力欄をカスタム投稿「紹介ページ」「お知らせ」でも利用したいです。

アップデート対応Ver1.15→1.16.1のアップデートで当記事のカスタマイズを行わなくても使用可能になりました。

A.下記の方法でカスタマイズしてください。

編集するファイル: functions/custom_css.php
編集する箇所: 12行目付近

add_meta_box('custom_css', __('Custom CSS for this page', 'tcd-w'), 'add_css_to_post_custom_css_input', 'page', 'normal', 'low');

 ↓ 記述を二行追加します。

add_meta_box('custom_css', __('Custom CSS for this page', 'tcd-w'), 'add_css_to_post_custom_css_input', 'page', 'normal', 'low');
add_meta_box('custom_css', __('Custom CSS for this page', 'tcd-w'), 'add_css_to_post_custom_css_input', 'introduce', 'normal', 'low');
add_meta_box('custom_css', __('Custom CSS for this page', 'tcd-w'), 'add_css_to_post_custom_css_input', 'news2', 'normal', 'low');

この記事は役に立ちましたか?

もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!

同じテーマのカスタマイズ記事