さて、とりあえず細かいデザインを調節するプラグイン関係はインストールして「有効化」を済ませましたが、いろんな資料を読んでいると、Wordpressテーマのカストマイズにはやはり「子テーマ」を使用した方が良い事がわかってきました。というわけで、プラグインの各設定は後にして、もう一度、Wordpress自体の構成とフォルダの階層を復習。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
<span style="color: #000080;"><strong>ルート</strong></span> <strong>┣━ wp-admin <DIR> 755</strong> <strong>┣━ <span style="color: #0000ff;">wp-content</span> <DIR> 755</strong> <strong>┃ ┣━ languages <DIR> 755</strong> <strong>┃ ┣━ plugins <DIR> 755</strong> <strong>┃ ┣━ <span style="color: #3366ff;">themes</span> <DIR> 755</strong> <strong>┃ ┃ ┣━ sixteen <DIR> 755</strong> <strong>┃ ┃ ┣━ <span style="color: #333399;">twentyfourteen</span> <DIR> 755</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">css</span> <DIR> 755</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">genericons</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">images</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">inc</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">js</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">languages</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">page-templates</span> <DIR> 755 </strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">404.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">archive.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">author.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">category.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">comments.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-aside.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-audio.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-featured-post...</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-gallery.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-image.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-link.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-none.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-page.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-quote.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content-video.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">content.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">featured-content.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">footer.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">functions.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">header.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">image.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">index.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">page.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">rtl.css</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">screenshot.png</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">search.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">sidebar-content.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">sidebar-footer.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">sidebar.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">single.php</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">style.css</span> 644</strong> <strong>┃ ┃ ┃ ┣━ <span style="color: #333399;">tag.php</span> 644</strong> <strong>┃ ┃ ┃ ┗━ <span style="color: #333399;">taxonomy-post_format....</span> 644</strong> <strong>┃ ┃ ┣━ <span style="color: #ff0000;">twentyfourteen-child</span> <DIR> 755</strong> <strong>┃ ┃ ┃ ┗━ <span style="color: #ff0000;">style.css</span> 644</strong> <strong>┃ ┃ ┣━ twentythirteen <DIR> 755</strong> <strong>┃ ┃ ┣━ twentytwelve <DIR> 755</strong> <strong>┃ ┃ ┗━ index.php 644</strong> <strong>┃ ┣━ upgrade <DIR> 755</strong> <strong>┃ ┣━ uploads <DIR> 755</strong> <strong>┃ ┗━ index.php 644</strong> <strong>┣━ wp-includes <DIR> 755</strong> <strong>┣━ index.php 644</strong> <strong>┣━ license.txt 644</strong> <strong>┣━ readme-ja.html 644</strong> <strong>┣━ readme.html 644</strong> <strong>┣━ wp-activate.php 644</strong> <strong>┣━ wp-blog-header.php 644</strong> <strong>┣━ wp-comments-post.php 644</strong> <strong>┣━ wp-config-sample.php 644</strong> <strong>┣━ wp-config.php 644</strong> <strong>┣━ wp-cron.php 644</strong> <strong>┣━ wp-links-opml.php 644</strong> <strong>┣━ wp-load.php 644</strong> <strong>┣━ wp-login.php 644</strong> <strong>┣━ wp-mail.php 644</strong> <strong>┣━ wp-settings.php 644</strong> <strong>┣━ wp-signup.php 644</strong> <strong>┣━ wp-trackback.php 644</strong> <strong>┗━ xmlrpc.php 644</strong> |
※今回は、階層の下に関しては、Twenty Fourteenのテーマに関連したフォルダ、ファイルのみ書き出し。後は又、別項目にて、、、
で、上記の様に親テーマ「twentyfourteen」と同じ階層に、子テーマ「twentyfourteen-child」(名前は任意)というフォルダを作り、その中に「style.css」を作成し、とりあえず以下のコードを記述して格納
1 2 3 4 5 |
/* Theme Name: Twenty Fourteen Child Template: twentyfourteen */ @import url('../twentyfourteen/style.css'); |
これで準備はOKなので後は、子テーマを「有効化」して以降はこちらを主体にカストマイズしていく事にする。
※この方法を取ると、親テーマを変えたり元に戻したりする場合もデフォルトに戻らず楽(ふむふむ、なんとなく又一つわかって来たぞ♪~♪ d(⌒o⌒)b♪~♪ランラン)