首页   Wordpress  wordpress 调用置顶文章和排除置顶文章

wordpress 调用置顶文章和排除置顶文章

调用置顶文章,并输出文章列表。

$sticky, 'caller_get_posts' => 1 ) );
if (have_posts()) :
while (have_posts()) : the_post();
?>


  • 排除置顶文章,并输出文章列表。


    get_option( 'sticky_posts' ) ) );
    if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();?>




    相关推荐

    发表回复

    邮箱地址不会被公开。