i have a parent PAGE and multiple sub-PAGES. I want to be able to pull the Title, Excerpt and a Custom field (vendor_img) from the sub-pages and have them appear in a list in the parent page.
I tried using this code…
<div class="maincontent">
<?php the_ID(); ?>
<?php $parent = $post->ID; ?>
<?php
query_posts('post_type=page&post_parent='.$parent);
while (have_posts()) : the_post();
?>
<div class="imagelisting">
<div class="Image">
<?php $image = get_post_meta($post->ID, 'vendor_img', true); ?>
</div>
</div>
<?php endwhile; ?>
</div>
but i receive an error message which you can see here on the parent page where i’m trying to get the child page info to appear in the list.
should I be placing a parent PAGE category name or id somewhere in that code? is the problem something else?
please advise. thanks in advance!