WordPress博客代码函数的调用分别意思。
<?php
$args = array(
'posts_per_page' => -1,
'showposts' => 2,
'cat'=> array(198,138),
);
$sticky_posts = new WP_Query( $args );
while ( $sticky_posts->have_posts() ) : $sticky_posts->the_post();?>
<li>
<a href="<?php the_permalink() ?>" target="_blank" ><?php the_title(); ?></a>
</li>
<?php endwhile; wp_reset_query();?>
以上代码所包含的代码的意思如下:
<?php the_permalink() ?>文章的链接
<?php the_title(); ?>文章名称