メモ書き

スポンサーリンク

スポンサーリンク

page.php (single.phpコピー)

/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/

カスタムするなら上記必須

メニュー削除必須

<?php get_header(); ?> //ヘッダー

<main> //メインはじまり(問題ある場合はクラスをつけて別途css)

<?php if(have_posts()): while(have_posts()):the_post(); ?> //記事ループ

<?php the_title(); ?>// タイトル

<?php the_content(); ?>//コンテンツ

<?php endwhile; ?>//終わったらループ終了

<?php else: ?> //記事がなかった場合は

投稿記事はありません

<?php endif; ?>//if終わり

</main> //メイン終わり

<?php get_footer(); ?> //フッター

wordpressで独自のページテンプレートを作成して固定ページに適用するための手順
wordpressでは、固定ページに対して独自のページテンプレートを作成して読み込ませることができます。特定の固定ページでのみサイドバー表示しないように、以下ではサイドバーを表示しないページテンプレートの作成とそれを固定ページで読み込ませるまでの手順をメモします。

テンプレの分ける場合は上記参照

footer (seven-teen コピー)

<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/

?>

</div><!– #content –>

<footer id=”colophon” class=”site-footer” role=”contentinfo”>
<div class=”wrap”>
<?php
get_template_part( ‘template-parts/footer/footer’, ‘widgets’ );

if ( has_nav_menu( ‘social’ ) ) :
?>
<nav class=”social-navigation” role=”navigation” aria-label=”<?php esc_attr_e( ‘Footer Social Links Menu’, ‘twentyseventeen’ ); ?>”>
<?php
wp_nav_menu(
array(
‘theme_location’ => ‘social’,
‘menu_class’ => ‘social-links-menu’,
‘depth’ => 1,
‘link_before’ => ‘<span class=”screen-reader-text”>’,
‘link_after’ => ‘</span>’ . twentyseventeen_get_svg( array( ‘icon’ => ‘chain’ ) ),
)
);
?>
</nav><!– .social-navigation –>
<?php
endif;

//get_template_part( ‘template-parts/footer/site’, ‘info’ ); //著作権抹消
?>
</div><!– .wrap –>
</footer><!– #colophon –>
</div><!– .site-content-contain –>
</div><!– #page –>
<?php wp_footer(); ?>

</body>
</html>

階層メニューの作り方

外観ーメニューーメニュー構造

階層を入れ子にするには、ドラッグする。

サブメニューバックグラウンド変更

.sub-menu li {

background : #???

}

階層下のliに対して設定

以下詳細設定は、class=”sub-menu”より

li {
margin-bottom: 5px;
}

メモ

XML Sitemap Generator for WordPress 4.0.9 を止める。
サイトマップURL変更 sitemap-sitemaps(サイトマップだけでおk)

All in One SEO Packか、
https://youland.net/3418.html

https://issyan.com/google-xml-sitemaps-4-0-9-404/
XML Sitemap Generator for WordPress 3.41
にする。

Google Search Console
Search Console でプロパティに関する Google 検索結果データを監視できます。

Fetch as Google
よりレンダリングでテスト。

・透過度
rgb(96, 65, 43 ,0.0); rgbaに変更

・インデックス設定 子テーマcss変更
1657 75-83vh
3726 100-83
3742 100-83
3751 100-83

付近の親cssから コピー

文字

body {
font-family: “游明朝”, YuMincho, “ヒラギノ明朝 ProN W3”, “Hiragino Mincho ProN”, “HG明朝E”, “MS P明朝”, “MS 明朝”, serif !important;
font-weight: 700;
}

ホーム画面の文字を左に寄せてみた。

ホーム画面の文字が最後(max-width: 415px 未満の時)左に寄るのは、@media screen and (max-width: 415px)

未満の時に強制的に読んでいるcssがあると思うので、

それを強引に書き変えてみることにした。

実際は真ん中に指定を変える。

html

<div id=”homepage”>
<span class=”homepage1″>    /*挿入(inline属性入れるため)

</span> /* 挿入
</div> css   @media screen and (max-width: 600px){   /*画面幅が0から600まで対応実際は415辺り。
.homepage1 p {             /*span1のクラスの中で、pタグのみ反応 !importantを付け強制強調   display:table !important; /* よくわからんがテーブル指定
background-color:#eef !important; /*テスト用に色付け、意味なし
text-align:left !important; /*テスト用に左寄せ、実際は中央
}
.homepage1 { /*spanに属性を付ける
display:inline-block !important; /*インライブロック
vertical-align: left !important; /*実際はmiddle }
}

span指定したのは、<p>タグ指定だけだと、全ページの<p>にかかるため、<div>じゃダメなのは、text-align:center;が二行以上つかえないから。

「 インラインブロック」化で字を強引に真ん中寄せ。line-heightがないのは、一行扱いだから。

参考資料

コメント

タイトルとURLをコピーしました