wordpress在NANA主题下首页最新文章滚动
这是针对当前博客主题在首页里面所修改后的滚动公告代码;
由原来固定的公告内容变为整站最新文章的调用;
具体代码如下:
<!--首页滚动公告开始--> <nav class="breadcrumb"> <div id="scrolldiv"> <div class="bull"></div> <div class="scrolltext"> <ul style="margin-top: 0px;"> <?php $scrollcount = get_option('ygj_new_post'); ?> <?php query_posts('&showposts='.$scrollcount.'&ignore_sticky_posts=1.&cat='.get_option('ygj_new_exclude')); while ( have_posts() ) : the_post();$do_not_duplicate[] = $post->ID; ?> <li class="scrolltext-title"><a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a> </li> <?php endwhile; ?> </ul> </div> </div> <script type="text/javascript">$(document).ready(function() {$("#scrolldiv").textSlider({line: 1, speed: 1000, timer: 3000});})</script> </nav>
1、本文由 ♚纪实阁付涛♚ 作者:付涛纪实阁 发表,其版权均为 ♚纪实阁付涛♚ 所有;
2、文章内容系作者个人观点,不代表除个人作者外的任何第三方针对观点赞同或支持;
3、本站文章均为博主原创,如需转载,请注明文章来源;