admin管理员组文章数量:1323724
Hi everyone I hope you have a great day, I was wondering if is there anyway I can call the year once?. I really don't know if its possible to call the date once cause mine keeps on repeating calling the year for every each post I have and here's the picture below what the output should look like
and here's a copy of my code
<div class="common_wrapper">
<?php
if(have_posts() ): while(have_posts () ): the_post();?>
<div class="wrapper_100">
<div class="width_30">
<h2><?php the_time('Y') ?></h2>
</div>
<div class="width_70">
<a href="<?php echo get_permalink(); ?>">
<div class="wrapper">
<div class="width_50">
<?php the_time('Y.m.d') ?>
</div>
<div class="width_50">
<?php the_title();?>
</div>
</div>
</a>
</div>
</div>
<?php endwhile; ?>
<?php else: endif;?>
</div>
Thank in advance and stay safe
本文标签: phpIs there anyway I can call the year once
版权声明:本文标题:php - Is there anyway I can call the year once? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742119312a2421621.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论