LoginSignup
0
3

More than 5 years have passed since last update.

一番シンプルなWordpressテーマ

Posted at

Wordpressで一番シンプルな構造とは?

 これからWordpressについて知りたいと思ってまずは簡単なシステムは何なのか?ということでメモ

必要なファイル

  • index.php
  • functions.php
  • screenshot.png
  • style.css

 必要最小限のファイルはこの4つのファイルになる。
 それぞれの中身は下記に記載

index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="ja"
      lang="ja">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=<?php bloginfo('charset'); ?>" />
        <title><?php bloginfo('name'); ?><?php wp_title(' : '); ?></title>
        <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
    </head>
    <body <?php body_class(); ?>>

    </body>
</html>
functions.php
// なし
style.css
/*
Theme Name: ThemaMin
Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the my name
Author URI: https://wordpress.org/
Description: オリジナルテーマ(日本語は文字化け)
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
Text Domain: ThemaMin
*/

これらのファイルからいろいろ追加していく必要があるけども、関数はすでに用意されているものを引用していけば問題ないかと思うのでいろいろ試してみようと思う。

サンプルのデータはこちら↓
https://github.com/chibadai/ThemaMin

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3