wordpress + Fullpage.js水平滚动可能吗?

时间:2014-02-24 00:49:54

标签: javascript jquery css wordpress fullpage.js

一直在玩Fullpage.js(http://alvarotrigo.com/fullPage/)and wordpress,这非常成功。脚本很棒,使用了一个htmls结构,其中一个幻灯片容器内的div变成了水平幻灯片。

对于wordpress,我有一个循环,可以抓取页面成为幻灯片,并且效果很好。但是,创建使用正确的类放置在父容器内的页面似乎是我无法弄清楚的。虽然觉得应该可以吗?如果有人知道循环可以做我想要的,我会很感激任何建议。

`

<?php

   if (($locations = get_nav_menu_locations()) && $locations['main-nav'] ) {
    $menu = wp_get_nav_menu_object( $locations['main-nav'] );
    $menu_items = wp_get_nav_menu_items($menu->term_id);
    $pageID = array();
    foreach($menu_items as $item) {
        if($item->object == 'page')
            $pageID[] = $item->object_id;
    }
query_posts( array( 'post_type' => 'page','post__in' => $pageID, 'posts_per_page' => count($pageID), 'orderby' => 'post__in' ) );
    }
    while(have_posts() ) : the_post();

    ?> 


   <!--     <div id="<?php echo $post->post_name;?>" class="section"> -->
 <div id="content2">
    <div id="pageSlide-<?php echo $post->post_name;?>" class="section" data-anchor="<?php echo $post->post_name;?>">

    <div id="content">

        <div id="inner-content" class="wrap clearfix">

            <div id="main" class="twelvecol first clearfix" role="main">

                <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">

                            <header class="article-header">

                                <h1 class="page-title"><?php the_title(); ?></h1>

                            </header>

                            <section class="entry-content clearfix" itemprop="articleBody">
                                <?php the_content(); ?>
                            </section>

                            <footer class="article-footer">
                                <p class="clearfix"><?php the_tags( '<span class="tags">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '' ); ?></p>

                            </footer>

                </article>

            </div>

        </div>
    </div>

  </div> <!-- end of page div-->

 ?php endwhile;?> <!-- end of query -->

`

0 个答案:

没有答案