在我们WordPress主题制作过程过用到最多的应该是调用文章的代码了,而根据主题功能需求的多样性,调用文章的需求也变得花里胡哨。
下面大资源网分享了几段WordPress调用最新、热门文章的代码实例
最新文章
<code rel=\”external nofollow\” ><?php the_title(); ?></a>
<?php endwhile;?>
指定分类文章
<code rel=\”external nofollow\” rel=\”external nofollow\” ><?php the_title(); ?></a>
<?php endwhile; wp_reset_query(); ?>
调用整站热门文章(按评论数排序)
<code rel=\”external nofollow\” rel=\”external nofollow\” ><?php the_title(); ?></a>
<?php } wp_reset_query();?>
文章来自大资源网https://www.smareoweoum.cn转载请保留本链接,谢谢!
