Viewing 1 replies (of 1 total)
  • Thread Starter HasanulBanna

    (@hasanulbanna)

    Hi

    <?php
    	$pages = get_pages('child_of='.$post->ID.'&sort_column=post_id&sort_order=desc&parent='.$post->ID);
    	foreach($pages as $page) {
    ?>
    
    		<div class="section" id="<?php echo $page->post_name; ?>">
    			<h4><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a></h4>
                <?php echo substr(apply_filters('the_content', $page->post_content),0,110).'....'; ?>
    		</div>
    
    <?php } ?>

    this code is working on main page if the page has sub page. But i want even on subpage the content same level subpages will be displayed.

    (:

Viewing 1 replies (of 1 total)
  • The topic ‘Display Subpage title and Content’ is closed to new replies.