Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do I call title (and custom field info) from the newest subpage of a defined parent Re: How do I call title (and custom field info) from the newest subpage of a defined parent

#127575
SpartanCopy
Member

I found this which displays the most recently created pages. This is the original code, but I have modified the one on my site to only display the title and image.

However I do not know how to modify it so rather than showing the most recently created pages on the whole site, it only shows the most recently created child page of my design page.

$args=array(
‘showposts’=>5,
‘post_type’ => ‘page’,
‘caller_get_posts’=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>

” rel=”bookmark” title=”Permanent Link to “>

endwhile;
}
?>

Any help would be appreciated.