开发者

Simple Wordpress question

开发者 https://www.devze.com 2023-03-29 02:22 出处:网络
I\'ve been programming for like 5 straight hours and my brain has kinda stopped functioning. I can\'t remember how to do this:

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

精彩评论

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

关注公众号