よく使う基本のタグ集
// headの閉じタグの直前に挿入
<?php wp_head(); ?>
// bodyの閉じタグの直前に挿入
<?php wp_footer(); ?>
// ループ要素をはさむ
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
// 出力数かえる
<?php if (have_posts()) : query_posts($query_string.'&posts_per_page=10'); ?>
// 投稿日付を出力
<?php echo get_post_time('Y年m月d日 H:i'); ?>
y だと 二桁の西暦
// 詳細ページへのリンクを出力
<a href="<?php the_permalink(); ?>"></a>
// タイトルを出力
<?php the_title(); ?>
// タイトルを変数に格納
$title = get_the_title();
// 内容を出力
<?php the_content(); ?>
// サマリーを出力
<?php the_excerpt(); ?>