Skip to content

Instantly share code, notes, and snippets.

@hitsujixgit
hitsujixgit / sidebar.php
Created June 19, 2014 04:25
テンプレートパーツ化する - index.phpをカスタマイズする#2
<!-- sidebar -->
<aside id="sidebar">
<h4>サイドバー</h4>
<ul><li>サイドバー設置予定</li></ul>
</aside>
@hitsujixgit
hitsujixgit / content.php
Created June 19, 2014 04:24
テンプレートパーツ化する - index.phpをカスタマイズする#2
<article class="post">
<header>
<h1 class="post-title"><?php the_title(); ?></h1>
<p class="post-meta"><?php the_date(); ?></p>
</header>
<div class="post-content">
<?php the_content(); ?>
</div>
</article>
@hitsujixgit
hitsujixgit / header.php
Last active August 29, 2015 14:02
テンプレートパーツ化する - index.phpをカスタマイズする#2
<!DOCTYPE html>
<html>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<title><?php bloginfo('name'); ?></title>
</head>
<body>
<div id="container">
<!-- header -->
@hitsujixgit
hitsujixgit / index.php
Created June 19, 2014 04:20
テンプレートパーツ化する - index.phpをカスタマイズする#2
<?php get_header(); ?>
<div id="content">
<?php
if(have_posts()): while(have_posts()): the_post();
get_template_part('content');
endwhile; endif; ?>
</div>
<?php
get_sidebar();
get_footer();
@hitsujixgit
hitsujixgit / style.css
Created June 19, 2014 03:53
HTMLからWPテーマを作成する - index.phpをカスタマイズする#1
/*
Theme Name: Sample 2.1
Theme URL: http://wordpress.hitsuji.me
Description: Wordpress sample theme for training.
Author: Tae Matsumoto
Version: 2.1
*/
/* 以下はすべて元のスタイルシートをコピーする */
/*---------------------------------------------------------*/
@hitsujixgit
hitsujixgit / index.php
Created June 19, 2014 03:52
HTMLからWPテーマを作成する - index.phpをカスタマイズする#1
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<title><?php bloginfo('name'); ?></title>
</head>
<body>
<div id="container">
<!-- header -->
@hitsujixgit
hitsujixgit / style.css
Created June 19, 2014 03:50
HTMLからWPテーマを作成する - index.phpをカスタマイズする#1
@CHARSET "utf-8";
/*---------------------------------------------------------*/
/* General */
/*---------------------------------------------------------*/
body {
font-family: 'Lucida Grande','Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
font-size: 14px;
color: black;
padding: 0;
@hitsujixgit
hitsujixgit / index.html
Created June 19, 2014 03:47
HTMLからWPテーマを作成する - index.phpをカスタマイズする#1
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" type="text/css" />
<title>Hitsuji x WordPress</title>
</head>
<body>
<div id="container">
<!-- header -->
@hitsujixgit
hitsujixgit / index.php
Created June 19, 2014 00:21
最小限のファイルでテーマを作成してみる-2
<body>
<h1><?php bloginfo('name'); ?></h1>
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</body>
@hitsujixgit
hitsujixgit / source.html
Created June 19, 2014 00:14
最小限のファイルでテーマを作成してみる
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>HitsujixWordpress</title>
<link rel="stylesheet" href="http://127.0.0.1:8080/wordpress/wp-content/themes/Training/style.css" type="text/css" />
</head>
<body>
Hello, welcome to Wordpress!
</body>