Displaying children of page with specific page id
-
I’m currently playing around with the page.php file to try and have it display certain information if the page has a specific title.
I’ll try and explain what I’m trying to do.
I was to create a ‘portfolios’ page in wordpress, which will then have a number of children pages underneath it. I want the portfolios page to display links to all the children pages as thumbnails. If the page is not the portfolios page I just want it to display as a standard page.
I’m trying to figure out how to code this using something like:
<?php if (is_page('Portfolios')) { DISPLAY THUMBNAILS HERE } else { THE USUAL PAGE CODE HERE } ?>
In theory I think something like that should work. The two questions I have are 1. am I on the right track? and 2. how would I just display children of the ‘Portfolios’ page in the ‘DISPLAY THUMBNAILS HERE’ section I’ve blocked out above?
Any advice/help is appreciated.
Thanks
- The topic ‘Displaying children of page with specific page id’ is closed to new replies.