好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

不用插件实现WordPress最新文章调用 - WordPress

不用插件实现WordPress最新文章调用

能不用插件就不要用插件实现,如果我们需要为我们的WP博客调用最新的内容文件,我们可以用代码直接实现:

<ul>  <?php  $post_query  =  new  WP_Query( 'showposts=10' );  while  ( $post_query ->have_posts()) :  $post_query ->the_post();  $do_not_duplicate  =  $post ->ID; ?>  <li><a href= "<?php the_permalink(); ?>" ><?php the_title(); ?></a></li>  <?php  endwhile ;?>  </ul> 

查看更多关于不用插件实现WordPress最新文章调用 - WordPress的详细内容...

  阅读:46次