posts - Wordpress empty page! what is wrong with this code?

I wrote this code, but when I set the page where I write this code as a posts page from the dashboad, then viewed it on

I wrote this code, but when I set the page where I write this code as a posts page from the dashboad, then viewed it on the browser. it has become empty, although I puplished one post. what is wrong with this code, please?

<?php
         if (have_posts()) : 
            while (have_posts()): the_post(); ?>

                 <div class="col-md-7 col-lg-8">

                         <div class="mb-50 mb-sm-30">
                                 <div class="pos-relative mb-30 pt-15">
                                         <div class="font-8 abs-tl p-20 bg-primary color-white">
                                                 <?php if(has_post_thumbnail()) : ?>

                      <img src="<?php the_post_thumbnail_url(); ?>" alt="">
                      <?php endif; ?>

              </div>
              <h4><a href="<?php the_permalink(); ?>"><b> <?php the_title(); ?> </b></a></h4>
              <h6 class="mt-10 bg-lite-blue dplay-inl-block">
                      <a class="plr-20 mtb-10" href="#"><b>By <?php the_author_posts_link(); ?></b></a>
                      <a class="plr-20 mtb-10 brder-lr-lite-black-2" href="#"><b>in <?php the_category( ', ' ); ?></b></a>
                      <a class="plr-20 mtb-10" href="#"><b> <?php comments_popup_link('0 comments'); ?> </b></a>
              </h6>
              <p class="mt-30"> <?php the_excerpt(); ?> </p>
      </div><!--mb-30-->
        <?php   endwhile;
           endif; ?>


发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742404780a4437624.html

相关推荐

  • posts - Wordpress empty page! what is wrong with this code?

    I wrote this code, but when I set the page where I write this code as a posts page from the dashboad, then viewed it on

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信