Mais conteúdo relacionado
Semelhante a WordPressの常識をくつがえす超簡単テーマ"doshirouto"を作ったのでこれでテーマを理解しよう! (20)
Mais de Takashi Uemura (20)
WordPressの常識をくつがえす超簡単テーマ"doshirouto"を作ったのでこれでテーマを理解しよう!
- 42. <?php
get_header();
?>
<div
id="primary"
class="content-‐area">
<div
id="content"
class="site-‐content"
role="main">
<?php
if
(
have_posts()
)
:
?>
<?php
while
(
have_posts()
)
:
the_post();
?>
<article
id="post-‐<?php
the_ID();
?>"
<?php
post_class();
?>>
<header
class="entry-‐header">
<h1
class="entry-‐title"><?php
the_title();
?></h1>
<div
class="entry-‐meta">
<?php
twentythirteen_entry_meta();
?>
<?php
edit_post_link(
'編集'
);
?>
</div>
</header>
<div
class="entry-‐content">
<?php
the_content(
'続きを読む...'
);
?>
<?php
wp_link_pages();
?>
</div>
<footer
class="entry-‐meta">
<div
class="comments-‐link">
<?php
comments_popup_link();
?>
</div>
</footer>
</article>
<?php
endwhile;
?>
<?php
twentythirteen_paging_nav();
?>
<?php
endif;
?>
</div>
</div>
<?php
get_footer();
?>
doshirouto/index.php
header.phpを読み込む
footer.phpを読み込む
while文によるループ処理
記事のタイトル
記事本文
コメントへのリンク
- 43. <!DOCTYPE
html>
<html
lang="ja">
<head>
<meta
charset="UTF-‐8"
/>
<meta
name="viewport"
content="width=device-‐width"
/>
<link
rel="stylesheet"
type="text/css"
href="<?php
bloginfo('stylesheet_url');?>"/>
<title>WordPressのタイトル</title>
<?php
wp_head();
?>
</head>
<body
<?php
body_class();
?>>
<div
id="page"
class="hfeed
site">
<header
id="masthead"
class="site-‐header"
role="banner">
<a
href="<?php
echo
home_url()
?>">
<hgroup>
<h1
class="site-‐title">WordBench神戸0506</h1>
<h2
class="site-‐description">WordPressの常識をくつがえすdoshirouto</h2>
</hgroup>
</a>
<div
id="navbar"
class="navbar">
<nav
id="site-‐navigation"
class="navigation
main-‐navigation"
role="navigation">
<?php
wp_nav_menu()
);
?>
<?php
get_search_form();
?>
</nav>
</div>
</header>
<div
id="main"
class="site-‐main">
doshirouto/header.php
style.cssを読み込む
ナビゲーションメニュー
検索ボックス
サイトタイトル
- 44.
</div><!-‐-‐
#main
-‐-‐>
<footer
id="colophon"
class="site-‐footer"
role="contentinfo">
<?php
get_sidebar(
'main'
);
?>
<div
class="site-‐info">
doshirouto
</div>
</footer>
</div><!-‐-‐
#page
-‐-‐>
<?php
wp_footer();
?>
</body>
</html>
doshirouto/footer.php
sidebar-main.php読み込み
WordPressのフッタ処理