List sub pages with breif description, images
-
hello,
I was wondering if someone can help me, Im looking to create a page template that will display the title, image, link and small excerpt of content from all the sub pages listed under that parent page.
any ideas what im doing wrong with calling to the parent and to have them display based on drop down menu order?
Code:
<?php $parent = $post->ID; ?> <?php query_posts('post_type=page&post_parent='.$parent); if (have_posts()) : $counter = 0; $counter2 = 0; while (have_posts()) : the_post(); $counter++; ?> <div class="box"> <h4 id="latest"><a title="<?php _e('Permalink to ',woothemes); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"></a> <p><?php print string_limit_words(get_the_excerpt(), 22); ?> …</p> <p class="post_meta1"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">READ MORE</a></p> </div><!-- / #box --> <?php if ($counter == 0) { ?><div class="fix" style="margin-bottom:20px;"></div><?php } ?> <?php endwhile; ?>
thanks for teh help
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘List sub pages with breif description, images’ is closed to new replies.