Weitere ähnliche Inhalte
Ähnlich wie Word press初心者が 基本アーキテクチャを ざっくりと学ぶ (20)
Word press初心者が 基本アーキテクチャを ざっくりと学ぶ
- 19. // カスタムヘッダー
$args = array(
'width' => 980,
'height' => 60
'default-image' => get_template_directory_uri() .
'/images/header.jpg',
'uploads' => true,
);
add_theme_support( 'custom-header', $args);
- 38. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php the_time('Y年m月d日'); ?>
<?php endwhile; else : ?>
//記事がない場合に表示
<?php endif; ?>
メインループ
- 39. テンプレート階層
トップページ home.php index.php
投稿ページ single-{post_type}.php single.php
固定ページ page-スラッ
グ.php
page-ID.php page.php
カテゴリー category-ID.php category.php archive.php
タクソノミー taxonomy-{taxonom
y}-{term}.php
taxonomy-{taxonom
y}.php
404 404.php
検索結果 search.php