Created
August 12, 2015 21:16
-
-
Save charleyramm/e783d988b2ff97840636 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- if the page has children: we want to display them in a gallery of featured images --> | |
<?php | |
if ($children = get_children(array( 'post_parent' => $post->ID ))){ | |
foreach ($children as $child){ | |
$link = get_permalink($child->ID); | |
echo "<div class='col-md-4 text-center fabric-child'>"; | |
echo "<a href='$link'>"; | |
echo get_the_post_thumbnail($child->ID, 'medium'); | |
echo "<p>$child->post_title</p>"; | |
echo "</a>"; | |
echo "</div>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment