Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function getSubPagesSortedByMenu($forPageID){
- return get_pages(array(
- sort_order => asc,
- sort_column => menu_order,
- child_of => $forPageID
- ));
- }
- function getCurrentPageID() {
- if(have_posts()) {
- while(have_posts()) {
- the_post();
- $current_page_id = get_the_ID();
- }
- }
- return $current_page_id;
- }
- echo '<div id="portfolio-columns">';
- foreach (getSubPagesSortedByMenu(getCurrentPageID()) as $child){
- echo '<div class="portfolio_page_post '. $child->post_name .'">';
- echo "<h2>".$child->post_title."</h2>";
- echo '<div class="entry">'.$child->post_content."</div>";
- echo "</div>";
- }
- echo '</div>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement