前提・実現したいこと
今wordpressを使い、HPを作成中です。
CSSの変更をしていると反応が遅いor無いことがあります。
今のところlinkタグに充ててるphpが勝手にコメントアウトされることが原因かなとも考えてます。
ちなみに、このコメントアウトはシークレットモードのみで見れるもので、wordpress内のエディターや、普通にサイトを開いたときに見る開発者ツールでもコメントアウトはされてません。
ソースコードは、header.php index.php footer.php function.php reset.css style.css
該当のソースコード
header.php
php
1<!DOCTYPE html> 2<html lang="ja"> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 7 <!-- Bootstrap CSS --> 8 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"> 9 </head> 10 <body class="mt-n4"> 11 <h1 class="title"></h1> 12 <!-- Optional JavaScript --> 13 <!-- jQuery first, then Popper.js, then Bootstrap JS --> 14 <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/reset.css"> 15 <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>?<?php echo date('Ymd-His'); ?>"> 16 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> 17 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script> 18 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script> 19 <!-- header --> 20 <header> 21 <ul class="container-fluid"> 22 <div class="row"> 23 <a class="button col-sm" href="#">ホーム<br><span class="font-size">HOME</span></a> 24 <a class="button col-sm" href="#">商品紹介<br><span class="font-size">INTRODUCTION</span></a> 25 <a class="button col-sm" href="#">業務内容<br><span class="font-size">SERVICES</span></a> 26 <a class="button col-sm" href="#">事業者情報<br><span class="font-size">PROFILE</span></a> 27 <a class="button col-sm" href="#">お問い合わせ<br><span class="font-size">CONTANCT</span></a> 28 </div> 29 </ul> 30 </header> 31<?php wp_head(); ?>
css
1/* 2Theme Name: hp_sakusei 3Theme URI: https://rmultigamingsever.com/ 4Description: test 5Author: yusuke 6Author URI: https://rmultigamingsever.com/ 7Version: 1.0 8*/ 9 10body { 11 font-family: Verdana, 'Arial Black', sans-serif; 12 font-size: 20px; 13 margin: 0; 14} 15/* header */ 16header { 17 height:120px; 18} 19 h1 { 20 text-align: center; 21 display: block; 22 } 23 .title { 24 white-space: nowrap; 25 } 26 .container-fluid { 27 display: flex; 28 justify-content: center; 29 } 30 @media (min-width: 0px) and ( max-width:576px){ 31 .container-fluid { 32 margin-top: 100px; 33 } 34 } 35 .font-size { 36 font-size: 0.3vw; 37 } 38 div.row { 39 width: 912px; 40 } 41 ul{ 42 display: flex; 43 justify-content: center; 44 align-items: center; 45 position: inherit; 46 background-color: black; 47 font-size: 20px; 48 height: 49px; 49 line-height: 20px; 50 51 } 52 ul > a { 53 text-decoration: none; 54 text-align: center; 55 color: white; 56 font-size: 1.2vw; 57 } 58 .button { 59 background-color: black; 60 color: #fff; 61 text-align: center; 62 } 63 64 .button:hover { 65 background: #888888; 66 color: white; 67 text-decoration: none; 68 69 } 70/* main */ 71nav.contact-text { 72 display: table-cell; 73 vertical-align: middle; 74} 75table,tr,th,td { 76 border: solid black 1px; 77 line-height: 22px; 78} 79th.list { 80 background: #EEEEEE; 81 padding: 10px; 82} 83.about { 84 width: 35%; 85 padding-left: 10px; 86} 87.about2 { 88 width: 35%; 89 height: 200px; 90 padding: 10px; 91} 92iframe { 93 float: right; 94 width: 30%; 95 height: 45%; 96} 97.leftbox { 98 float: left; 99 width: 20%; 100} 101/* footer */ 102footer { 103 width: 100%; 104 min-height: 160px; 105 margin: 0; 106 padding: 20px 10px; 107 display: grid; 108 grid-template-columns: minmax(20%, 1fr) auto minmax(20%, 1fr); 109 grid-template-rows: repeat(3, auto); 110} 111div, dl { 112 grid-column: 2; 113} 114 115p.h6 { 116 grid-row: 3; 117 grid-column: 3; 118 overflow-wrap: break-word; 119 white-space: nowrap; 120} 121 122@media (max-width: 800px) { 123 p.h6 { 124 grid-column: 2; 125 } 126} 127
試したこと
・キャッシュクリア、wordpress側のキャッシュクリア(wordpress側はうまくできてないかもしれない)
・https://www.merges.co.jp/archives/745
上記のurlにある提案1を採用して、常にキャッシュクリアしているような状態を作る
・WP Fastest Cacheというプラグイン追加(今は適応してない)
・シークレットモードにてコメントアウトを確認
・phpが勝手にコメントアウトされる記事探すもhtmlファイルの記事ばかり
・bootstrap4の干渉がないかチェック
補足情報(FW/ツールのバージョンなど)
Windows10 bootstrap4 wordpress mixhost
回答1件
あなたの回答
tips
プレビュー