WordPress调用置顶文章代码教程
WordPress调用置顶文章是常用的调用代码,码笔记分享WordPress调用置顶文章代码: WP调用置顶文章代码 以下代码为调用5篇置顶文章: <?php $sticky = get_option('sticky_posts'); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 5); query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) ); if (have_posts()) : while (have_posts()) : the_post();?> <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> //码笔记:调用置...