prionnsias
Member
Posted 5 months ago #
Done anyone know the PHP code to do the following
I have a bunch of pages that are children of other pages
what i would like to do is have the parent page list each of it's children in the main body
then pull a couple of the custom fields from each child page
example
Parent page is Called "Crew"
Child page is called "Andrew"
on "Andrew" page there is a picture in a custom field and his role on the team in another custom field
I want the parent page to display the picture of "Andrew" and the role
then go on and do the rest for all the children pages of "Crew"
thoughts?
thanks
You would want to create a template page for your parent pages: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Then you would want to create a custom query within or after the main query of this page template: http://codex.wordpress.org/Class_Reference/WP_Query
And then you would want to display any custom meta that you've added: http://codex.wordpress.org/Function_Reference/get_post_meta
Hope this helps.
prionnsias
Member
Posted 5 months ago #
Thank you for the quick response
I will look at those and let you know if i have additional questions