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...
<?php the_ID(); ?>
<?php $parent = $post->ID; ?>
while (have_posts()) : the_post();
<?php $image = get_post_meta($post->ID, 'vendor_img', true); ?>
<?php endwhile; ?>
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!
What have you done with that PHP code? Added it to your editor?
yeah, in the HTML editor for that page. i just realized i didn't have any plugin to run php in a page or post so I just installed an exec-php plugin: http://bluesome.net/post/2005/08/18/50/.
now for some reason "250" appears on the screen.
please advise. thanks!