I am using this code to get a list of child pages excluding the current page and is working fine.
But... When I'm viewing a child page, the parent page is not listed...
How can I exclude the current page making sure that the parent page get's listed on child pages?
<div style="background-color:#0C1D19">
<?php global $id;
$pages = get_pages(array('child_of' => 7171, 'sort_column' => 'post_date' , 'showposts' => '5' , 'sort_order' => 'desc' ,'exclude'=> $id)); ?>
<?php foreach ($pages as $page): ?>
<h2><a href="<?php echo get_page_link($page->ID); ?>"><?php echo $page->post_title; ?> </a></h2>
<div style="float:left">
<a href="<?php echo get_page_link($page->ID); ?>" title="<?php echo $page->post_title; ?>"rel="bookmark">
<?php if(has_post_thumbnail($page->ID)) { ?>
<?php echo get_the_post_thumbnail($page->ID, 'mini-thumbnail');?>
<?php } else { ?>
<?php echo '<img src="'.get_bloginfo('template_directory').'/images/pic_post-mini.jpg"/>';?> <?php } ?></a>
<span class="overlay_pages"></span></a>
</div>
<?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?>
<?php endforeach; ?>
</div>