Excerpt stripping pictures
-
I have page children that I want to list as titles along with excerpts on the parent page. I have done it almost successfully with the following code coming after the <?php the_content(”); ?> on the parent page.
The problem is the code ending in <? the_excerpt(); ?> is stripping the picture I have in the child page. Each child page has a picture from the attached gallery in the content before the <!– more –> tag. How can I change this code so that picture is included instead of stripped out?
thanks
JSC<? $pageChildren = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT'); ?> <? if ( $pageChildren ) : foreach ( $pageChildren as $pageChild ) : setup_postdata( $pageChild ); ?> <h2 class="subpagetitle"><a href="<?php echo get_permalink($pageChild->ID); ?>"><?php echo $pageChild->post_title; ?></a></h2> <? the_excerpt(); ?> <? endforeach; endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Excerpt stripping pictures’ is closed to new replies.