Show Child Pages with excerpts and "Read more"
-
Hi!
I have a page on which I want to show only it’s child pages’ excerpts. Underneath these excerpts there should be a “read more” button. I want to achieve this by adding the <—more—> quicktag in the pages.
This is what I have:
<?php $pages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc' )); $pagecount = count($pages); ?> <?php foreach($pages as $page) { ?> <article id="post-<?php the_ID(); ?>" <?php post_class($column); ?>> <header class="entry-header"> <h4 class="entry-title"><?php echo $page->post_title ?></h4> </header><!-- .entry-header --> <div class="front-page entry-content" id="<?php echo $page->post_name; ?>"> <?php $content = $page->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; ?> </div>
However I don’t get it to show any excerpts! Setting the quicktag doesn’t seem to have any influence and I’m also missing the “read more” links!
How do I get that?
Thank you so much!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Show Child Pages with excerpts and "Read more"’ is closed to new replies.