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

#127675
SpartanCopy
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.