Hi
I would like to be able to have Page Excerpts in the same way as we hove Post excerpts – really just to deal with some password protected pages where some of the information showing in the automatic capture shouldn’t be on show. I read that it could be done, but the code supplied needs to be adapted for the appropriate theme.
Another way to display page excerpts is by adding the code directly to your theme files. You can create a custom page template and add the following code as an starting point.
$args = array(
'post_type' => array( 'page' ),
'posts_per_page' => 10,
);
// The Query
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<h3>'. get_the_title() . '</h3>';
the_excerpt();
}
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}
You will need to adjust the code to match your theme templates.
Thanks