Displaying Custom Values for Child Pages on Parent Page
-
I am attempting to ease my way into theme development, and am trying to display a custom value (“artist_photo_thumb”) for each child page on its parent page.
Attached to the parent page “Artists”, there are child pages which each have the custom value “artist_photo_thumb”, which is a URL to an image. When on the parent page, I want each child page to be a list item in an unordered list, with the “artist_photo_thumb” being the image that should be displayed along with the child page name below it.
https://dev.lukeshumard.com/blackcity/artists/
Right now I have it listed as just the child page names, and I have no idea how to query the child pages.
<?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); if ($children) { ?> <ul id="artists"> <?php echo $children; ?> </ul> <?php } ?>
I don’t want the code to be done for me, but any ideas as to how this might be possible would be greatly appreciated. Thank you.
- The topic ‘Displaying Custom Values for Child Pages on Parent Page’ is closed to new replies.