Created
May 21, 2013 09:52
-
-
Save rajvanshipradeep15/5618678 to your computer and use it in GitHub Desktop.
wordpress: get_pages
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
<?php | |
$pages = get_pages(); | |
?> | |
<?php $count = 1; ?> | |
<div class="span12"> | |
<?php | |
foreach ( $pages as $page ) { | |
$page_link = get_page_link( $page->ID ); | |
$title = $page->post_title; | |
?> | |
<?php if($count < 4 && $title != 'Home') : ?> | |
<div class="span4"> | |
<div class=""> | |
<?php echo get_the_post_thumbnail($page->ID, 'medium'); ?> | |
</div> | |
<h3 class="entry-title"><a style="color:#e052ac;" href="<?php echo $page_link; ?>"><?php echo $title; ?></a></h3> | |
<?php echo truncateWords($page->post_content); ?> | |
</div> | |
<?php $count++; ?> | |
<?php endif; ?> | |
<?php | |
} | |
?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment