A widget to display excerpts from posts or pages in the sidebar. You may use ‘more’ links and/or link the widget title to the post or page.
Requires Page Excerpt or Excerpt Editor for page excerpts. Supports the_excerpt Reloaded and Advanced Excerpt.
download at wordpress.org get support at wordpress.org donate to future development
If you’d rather not use a widget, here’s the more or less equivalent code for your template (which does not require you to install this plugin).
For pages:
<?php
// page title
echo = '<a href="'.get_permalink($post->ID).'">'.the_title().'</a>';
// custom Loop
$page_query = new WP_Query('page_id='.$post->ID);
while ($page_query->have_posts()) : $page_query->the_post();
// the excerpt of the page
if (function_exists('the_excerpt_reloaded'))
the_excerpt_reloaded(100, '<p><div><span><br /><img /><a><ul><ol><li><blockquote><cite><em><i><strong><b><h2><h3><h4><h5><h6>', 'content', FALSE, ", ", '1′, ");
else the_excerpt(); // this covers Advanced Excerpt as well as the built-in one
endwhile; // end custom Loop
?>
For posts, the query is slightly different:
<?php
// page title
echo = '<a href="'.get_permalink($post->ID).'">'.the_title().'</a>';
// custom Loop
$post_query = new WP_Query('p='.$post->ID);
while ($post_query->have_posts()) : $post_query->the_post();
// the excerpt of the page
if (function_exists('the_excerpt_reloaded'))
the_excerpt_reloaded(100, '<p><div><span><br /><img /><a><ul><ol><li><blockquote><cite><em><i><strong><b><h2><h3><h4><h5><h6>', 'content', FALSE, ", ", '1′, ");
else the_excerpt(); // this covers Advanced Excerpt as well as the built-in one
endwhile; // end custom Loop
?>


