Hello I'm using this code to get custom field values from childern pages:
<?php
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => -1,
'caller_get_posts'=> 1,
'post_parent' => $post->ID
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p><?php echo get_post_meta($post->ID, 'URL', true); ?></p>
<?php endwhile;
}
wp_reset_query();
?>
What should I add/modify to get the custom field values from granchildren pages?