List SubPages on top Level Page
-
How would I display a list of subpages of the page currently being viewed?
I also need to be able to display an excerpt (which is in a custom field) and an image (also in a custom field)
The code i have atm causes the theme to break.
<?php $pageid = page_id(); echo $pageid; query_posts('post_type' => 'page', 'showposts' => '-1', 'page_id='.$pageid); ?> <?php while (have_posts()) : the_post(); $categoryimageurl = get_post_custom_values('category_thumb'); $categoryexcerpt = get_post_custom_values('project_category_excerpt'); ?> <div class="projectsPageLeft"> <a href="<?php the_permalink(); ?>" rel="bookmark"><img src="<?php echo $categoryimageurl[0] ?>" alt="<?php the_title(); ?>" width="102" class="sectors" /></a> </div> <div class="projectsPageRight"> <span class="headerRed"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></span> <br /> <?php echo $categoryexcerpt[0] ?> <br /> <a href="<?php the_permalink(); ?>" rel="bookmark">View all <?php the_title(); ?> Projects ></a> </div> <div class="clear"></div> <br /> <br /> <?php endwhile;?> <?php wp_reset_query(); // Restore global post data ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘List SubPages on top Level Page’ is closed to new replies.