开发者

Simple Wordpress question

I've been programming for like 5 straight hours and my brain has kinda stopped functioning.

I can't remember how to do this:

There is a page called Blog on my website, and I need to show all posts from my blog on that page. The Blog page is us开发者_如何学Cing custom template... Therefore, it's not index.php...

Please help me, I'm lost :/


Include loop.php in your template. That is what gets and displays posts.


To show blog post on a custom markup template, you can use this procedure, to loop if there are any posts and print them via the_content function.

<?php
  if (have_posts()) :
    while (have_posts()) : the_post();
      the_content();
    endwhile;
  endif;
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜