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
March 10, 2013 at 1:04 pm
#127675
Member
I have now got the answer to my question. For anyone who reads this and is struggling with the same thing then just add the following code to the initial argument.
‘post_parent’ => ’22’
(replace 22 with the page id of the parent)
The rest of the code stays the same. so it now becomes
$args=array(
‘showposts’=>5,
‘post_type’ => ‘page’,
‘caller_get_posts’=>1,
‘post_parent’ => ’22’ //replace 22 with the page id of the parent.
);
Remember to add a , (comma) to the line before so the code knows ‘post_parent’ is a new argument.