• http://www.kubryk.net/wordpress

    Hi. Could you tell me how to change the slider so that it points to pages instead of posts? What modifications to the code should be done?

    <div class="flex-container">
                  <div class="flexslider">
                    <ul class="slides">
                    <?php
                    query_posts(array('category_name' => 'featured', 'posts_per_page' => 3));
                    if(have_posts()) :
                        while(have_posts()) : the_post();
                    ?>
                      <li>
                        <?php the_post_thumbnail(); ?>
                        <div class="caption_wrap">
                        <div class="flex-caption">
                        <div class="flex-caption-wordtitle">
                        <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
                        </div>
                        <p><?php echo get_slider_excerpt(); ?>
                        <a href="<?php the_permalink() ?>">...</a></p>
                        </div>
                        </div>
                      </li>
                    <?php
                        endwhile;
                    endif;
                    wp_reset_query();
                    ?>
                    </ul>
                  </div>
    	</div>

    I tried to change query_posts function parameters to those:

    'post_type' => 'page',
      'post__in' => array(0,1,2)

    But it doesn’t work. There is Error.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adamos: pages instead of posts’ is closed to new replies.