私はPHP(そして一般的にはコーディング)を使い始めていて、私のcustom-style.phpファイルを編集する方法を見つけるのに苦労しています。 私はワードプレスサイトを持ち、要素のフォントサイズを変更したいと思っています。PHPをcssに変換する
私は開発ツール(クローム経由)を介してページを閲覧すると、カスタム・style.phpファイルのフルCSSが表示され、私は編集する必要がある領域を参照することができます
/* HEIGHT MENU */
\t \t \t header #logo { height: 86px; \t }
\t \t \t /*.open-nav { height: 86px; }
\t \t \t .open-nav .text { line-height: 86px; \t }*/
\t \t \t header.header-open:not(.header-transparent) nav#main-nav > ul > li > a { line-height: 86px; }
\t \t \t header.header-open:not(.header-transparent) nav#main-nav ul li > ul.sub-menu { top: calc(50% + 15px); }
\t \t \t /*#page-body { padding-top: 206px; }*/
\t \t \t header:after, header:before { top: -206px; height: 206px; } \t
\t \t \t header.header-open:not(.header-transparent) + #hero, header.header-open:not(.header-transparent) + #page-body { margin-top: 206px; }
\t \t \t #header-filter, #header-share, #header-search { top: -206px; \t min-height: 206px; }
\t \t \t header.header-open:not(.header-transparent) #menu .open-filter, header.header-open:not(.header-transparent) #menu .open-share, header.header-open:not(.header-transparent) #menu .open-search, header.header-open:not(.header-transparent) #menu .menu-language { top: calc(43px + 2px); -webkit-transform: translateY(100%); -moz-transform: translateY(100%); -ms-transform: translateY(100%); -o-transform: translateY(100%); transform: translateY(100%); }
\t \t \t
\t \t \t \t \t @media only screen and (max-width: 781px) {
\t \t \t \t \t \t header #logo { height: 30px; \t }
\t \t \t \t \t \t header:after, header:before { top: -90px; height: 90px; }
\t \t \t \t \t \t header.header-open:not(.header-transparent) + #hero, header.header-open:not(.header-transparent) + #page-body { margin-top: 90px; }
\t \t \t \t \t }
\t \t
ただし、ファイルは次のように表示されます:
<?php
$sr_prefix = "_sr";
header("Content-type: text/css");
$absolute_path = __FILE__;
$path_to_file = explode('wp-content', $absolute_path);
$path_to_wp = $path_to_file[0];
require_once($path_to_wp . '/wp-load.php');
?>
/* HEIGHT MENU */
<?php echo sr_custom_style_logo(); ?>
私はここで何が欠けていますか?このコードを拡張して編集するにはどうすればよいですか?
'sr_custom_style_logo();とは何ですか? – Jek
おそらくテーマ開発者が作成した関数です。子供のテーマを探して、あなたの好みに合わせてstyle.cssを変更してください。 – RST