wordpress在NANA主题下首页最新文章滚动

原创 2018-05-08 12:50 热度: 5 评论 0 条【推荐给百度】

这是针对当前博客主题在首页里面所修改后的滚动公告代码;

由原来固定的公告内容变为整站最新文章的调用;

具体代码如下:

  1. <!--首页滚动公告开始-->
  2. <nav class="breadcrumb">
  3. <div id="scrolldiv">
  4. <div class="bull"></div>
  5. <div class="scrolltext">
  6. <ul style="margin-top: 0px;">
  7. <?php
  8. $scrollcount = get_option('ygj_new_post');
  9. ?>
  10. <?php
  11. query_posts('&showposts='.$scrollcount.'&ignore_sticky_posts=1.&cat='.get_option('ygj_new_exclude'));
  12. while ( have_posts ) : the_post;$do_not_duplicate = $post->ID; ?>
  13. <li class="scrolltext-title"><a href="<?php%20the_permalink;%20?>" target="_blank"><?php the_title; ?></a>
  14. </li>
  15. <?php endwhile; ?>
  16. </ul>
  17. </div>
  18. </div>
  19. <script type="text/javascript">$(document).ready(function {$("#scrolldiv").textSlider({line: 1, speed: 1000,
  20. timer: 3000});})</script>
  21. </nav>
  22. <!--首页滚动公告结束-->

付涛的微信扫一扫/加好友/聊一聊

微信机器人高级版扫一扫看效果【免费下载】

文章导航

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: