ヒヨコindex.phpを編集

 ・<head> 内に必ず入れないといけないコード

  

<head> 内に必ず入れないといけないコード

<?php wp_head(); ?>

WordPressのテーマに含める関数。

admin_barや必要となるソースの出力などを行う。

これがないとプラグインが機能しなかったり、出力したい情報が出力できなかったりする。

 

<html lang="ja">

<html lang="<?php language_attributes(); ?>"

          言語設定を自動的に出力
中略
<title>index | wpbeg-static</title>→
削除

中略
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/earlyaccess/mplus1p.css">→
削除
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Sacramento&amp;amp;subset=latin-ext">→削除
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">→削除
<link rel="stylesheet" href="css/normalize.css">→削除

<link rel="shortcut icon" href=" //wp.tarou-net.com/WP                   /images/common/ico/favicon.ico">
<link rel="shortcut icon" href=" <?php echo get_template_directory_uri(); ?> /images/common/ico/favicon.ico">        

                 echo get を使ってテンプレートのあるuriを呼び出している 

<?php wp_head(); ?>

WordPressのテーマに含める関数
</head>

 

鳥CSS や JavaScript などは header で直接読み込むではなく

functions.php に設定を書いて出力する鳥

 

 

 

📁フォルダ

(現時点で未作成フォルダ含む)

WP/css/WP.css   

/footer.php   

/functions.php   

/header.php   

/images/   

/index.php   

/page.php   

/screenshot.png   

/searchform.php   

/sidebar.php   

/single.php

/style.css