/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div class="sidebar" id="ip-sidebar"> <h1><span>More</span> Investment Professionals</h1> <?php $id_of_the_parent_page = 17; ?> <?php $pages = get_pages(); ?> <?php $allChildrenPages = & get_page_children( $id_of_the_parent_page, $pages ) ?> <?php $thisChildPage = $allChildrenPages[$i]; $childId = $thisChildPage->ID; ?> <?php $key="choose-invest-prof" ?> <?php $value= get_post_meta($post->ID, $key, true); ?> <?php if ($value=="investment-professional"): {?> <div class="item <?php $key="choose-invest-prof"; echo get_post_meta($thisChildPage->ID, $key, true); ?>"> <div class="thumb"> <div class="border"> <?php echo $thisChildPage->post_content; ?> </div> </div> <div class="item-info"> <h4><a href="<?php echo get_permalink($thisChildPage->ID); ?>"><?php echo $thisChildPage->post_title; ?></a></h4> <p><?php echo get_post_meta($childId, "job-description", true) ?></p> </div> <div class="clear"></div> </div> <?php endif ?> <?php } ?> </div>