Last active
August 29, 2015 13:56
-
-
Save YoshinoriKobayashi/9136313 to your computer and use it in GitHub Desktop.
WordPress Main Loop while loop have_posts()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// have_posts 次の投稿が存在すれば、true | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/have_posts | |
// the_post() 記事情報の変数設定 | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/the_post | |
while (have_posts()) : the_post(): | |
get_template_part('content'); | |
endwhile; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment