所以,我很难想出如何为Wordpress站点编写这种实现。我已经完成了第一部分,但对于如何真正做到这一点,我有点困惑。
因此,我将发布我的一些代码和屏幕截图,它们可能会帮助您更好地理解我要实现的目标。
<!-- START WRAPPER BLOG -->
<div id="blog-wrapper">
<section id="blog">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<section class="post">
<article class="entry">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<aside class="date"><img src="http://www.test.ital.me/wp-content/themes/2013theme/images/clock.png"><?php the_time(\'D, jS, Y\') ?></aside>
<aside class="category"><img src="http://www.test.ital.me/wp-content/themes/2013theme/images/clock.png"><?php the_category(\', \') ?></aside>
<div class="content"><?php the_content(); ?></div>
</article>
</section>
<?php endwhile; else: ?>
<?php endif; ?>
</section>
</div>
<!-- END WRAPPER BLOG -->
上面粘贴的就是我的博客模板。它获取了你的基本文章,只需忽略那些多余的东西(用于图标)。无论如何,我正在考虑用下面列出的一些javascript/jquery链接这些文章。因此,单击#\\u btnUp时,它可以循环到previos文章,单击#\\u btnDown时,它可以循环到下一篇文章。
<script>
$(".up-arrow").click(function(){
$(\'#_btnUp\').show(\'up-arrow\', function(){
});
});
$(".down-arrow").click(function(){
$("#_btnDown").hide(\'down-arrow\',function(){
});
});
</script>
http://cl.ly/image/2I0H2O2i2L24
上面贴的是我试图完成的截图。我想做的是,如果单击箭头,它只会显示一个帖子/循环。不过,问题是我不知道如何把它拼凑起来。所以我请求你的帮助。有人知道如何指导我如何完成这项任务吗:)谢谢!:D