<html lang="ja">
<head>
<meta charset="<?php bloginfo('charset') ?>">
<title><?php bloginfo('name'); ?>
<?php wp_title(); ?></title>
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="header">
<h1><a href="<?php echo home_url('/'); ?>"><?php bloginfo('name'); ?></a></h1>
<p id="desc"><?php bloginfo('description'); ?></p>
<p id="image"><img src="<?php bloginfo('template_url'); ?>/images/header.jpg" alt="" width="760" height="200" /></p>
</div>
<div id="wrapper">
<div id="content">
<div id="pagetitle">
<?php if(is_month()): ?>
<p id="pagetitle"><?php echo $year.'年'.$monthnum.'月'; ?></p>
<?php endif; ?>
<?php if(is_category()): ?>
<p id="pagetitle"><?php single_cat_title(); ?></p>
<?php endif; ?>
</div>
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<p class="postinfo">
<?php the_date(); ?> <?php the_time(); ?>
|
カテゴリ:<?php the_category(', '); ?>
</div>
<?php endwhile; endif; ?>
</p>
</div>
<div id="sidebar">
<ul>
<?php dynamic_sidebar(); ?>
</ul>
</div>
</div>
<?php if(is_home()): ?>
<p class="pagelink"><span class="oldpage">
<?php next_posts_link('« 前の記事'); ?>
</span></p>
<p class="pagelink"><span class="newpage">
<?php previous_posts_link('次の記事 »'); ?>
</span></p>
<?php endif; ?>
<?php if(is_single()): ?>
<p class="pagelink">
<span class="oldpage"><?php previous_post_link(); ?></span>
<span class="newpage"><?php next_post_link(); ?></span>
</p>
<?php endif; ?>
<div id = "footer">
<address>Copyright ©
<a href="mailto:<?php bloginfo('admin_email'); ?>">ひだまりりの日記</a>
</address>
</div>
</div>
</body>
</html>
"UTF-8";
* {
margin: 0;
padding: 0;
}
body {
font-family:
"Hiragino Kaku Gothic Pro",
"ヒラギノ角ゴ Pro W3",
Meiryo,
"メイリオ",
Osaka,
"MS P Gothic",
"MS Pゴシック",
sans-serif;
background-color: #F6F2E6;
}
article,aside,figcaption,figure,footer,header,hgroup,nav,section {
display: block;
}
img {
border: 0;
vertical-align: bottom;
}
#container {
width: 760px;
margin: auto;
}
#wrapper {
overflow: auto;
}
#header {
margin: 0 0 20px 0;
padding: 0 0 10px 0;
}
#header h1 {
font-size: 1.875em;
float: left;
margin: 0 0 5px 0;
}
#header p#image {
margin: 8px 0 0 0;
}
#header p#desc {
color: #444;
font-size: 0.75em;
float: right;
margin: 22px 8px 0 0;
}
#header h1 a {
color: #000;
text-decoration: none;
}
.post {
margin: 0 0 20px 0;
padding: 15px;
border: solid 1px #0c8bcd;
}
.post h2 {
font-size: 0.875em;
padding: 10px;
background-color: #a3d2f2;
}
.post h2 a {
color: #000;
text-decoration: none;
}
.post p {
font-size: 0.875em;
line-height: 1.6;
margin: 10px 0 0 0;
}
p.postinfo {
color: #2b76cc;
text-align: right;
margin: 20px 0 0 0;
clear: both;
}
p.postinfo a {
color: #2b76cc;
}
.post h2 {
font-size: 0.875em;
padding: 10px;
background-color: #ddefc0;
background-color: #a3d2f2;
background-image: url(images/titlebar.png);
}
span.oldpage {
float: left;
margin: 0 0 15px 0;
display: inline;
}
span.newpage {
float: right;
margin: 0 0 16px 0;
display: inline;
}
p.pagelink a {
color: #0c8bcd;
font-size: 0.75em;
}
#footer {
clear: both;
padding: 8px 0;
border-top: dotted 1px #333;
}
address {
font-size: 0.75em;
font-style: normal;
font-family:
Verdana, Geneva, sans-serif;
text-align: center;
}
address a {
color: #000;
}
.alignleft {
float: left;
margin: 0 10px 10px 0;
}
.alignright {
float: right;
margin: 0 0 10px 10px;
}
.wp-caption {
text-align: center;
margin: 20px auto 0 auto;
padding: 5px 0 5px 0;
border: solid 1px #aaa;
}
#content {
width: 515px;
float: left;
}
#sidebar {
width: 220px;
float: right;
}
#sidebar ul {
list-style-type: none;
}
#sidebar .widget {
color: #FFF;
margin: 0 0 10px 0;
padding: 16px;
background-color: #0c8bcd;
border-radius: 5px;
border-radius: 5px;
border-radius: 5px;
border-radius: 5px;
}
#sidebar h2 {
font-size: 0.75em;
margin: 0 0 10px 0;
padding: 0 0 8px 0;
border-bottom: solid 1px #FFF;
}
#sidebar .widget li {
font-size: 0.75em;
line-height: 1.5;
margin: 0 0 4px 0;
padding: 0 0 0 16px;
background-image: url(images/listmark.gif);
background-repeat: no-repeat;
background-position: left 3px;
}
#sidebar .widget li a {
color: #FFF;
text-decoration: none;
}
p#pagetitle {
color: #0C8BCD;
font-size: 0.875em;
font-weight: bold;
text-align: center;
padding: 10px 0;
border: dotted 1px #0C8BCD;
margin: 0 0 20px 0;
}
#pagetitle {
margin: 0 0 10px 0;
}
<?php
register_sidebar();
?>