-
-
Save jaibeee/793c5506dfe0ecb46db5 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
// get pages | |
$pages = get_pages("child_of=".$post->ID.'&sort_column=post_title&sort_order=desc&parent='.$post->ID); | |
// loop through pages pages to get page properties | |
foreach($pages as $page) { | |
?> | |
<div class="wp-caption alignleft"> | |
// create an hyperlink from the get_page_link method and embed the image retrieved from get_the_post_thumbnail in it | |
<a href="<?php echo get_page_link($page->ID) ?><?php echo get_the_post_thumbnail($page->ID); ?> | |
// get the title and use it as the caption | |
<?= $page->post_title ?> | |
</div> | |
// get the content | |
<?php echo $page->post_content; ?> | |
<?php edit_post_link('Edit.', '', '', $page->ID); ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment