• Resolved locita

    (@locita)


    hello again,
    i use this code on my frontpage template to display 6 page excerpts. it is showing only 3??! as i don’t know much php – did i do something wrong? or could that simply be a styling problem?

    <?php
      $args=array(
      'orderby' =>'ID',
      'order' =>'asc',
      'post_type' =>'page',
      'post__in' => array(35,32,26,148,172,38),
       );
       $page_query = new WP_Query($args); ?>
     <ul class="section">
    <?php while ($page_query->have_posts()) : $page_query->the_post(); ?>
    
        <li id="ID<?php the_ID();?>" class="introbox"><h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
        <?php the_excerpt(); ?>
           <!--  <p class="readmore"><a href="<?php the_permalink();?>">zum Inhalt</a></p>
        <span class="perm"><a href="<?php the_permalink();?>">Permalink</a></span> -->
        </li>
    <?php endwhile; ?>

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wrong number of excerpts’ is closed to new replies.