Title: Include Post Excerpt ?
Last modified: August 19, 2016

---

# Include Post Excerpt ?

 *  [johnep](https://wordpress.org/support/users/johnep/)
 * (@johnep)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include-post-excerpt/)
 * The plugin works fine however I’d like for it to also display the excerpt from
   the post in the sidebar as well…I don’t want the entire post content to display,
   just the excerpt…can you please give me the code? Thank you
 * [http://wordpress.org/extend/plugins/wp-postviews-plus/](http://wordpress.org/extend/plugins/wp-postviews-plus/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Richer Yang](https://wordpress.org/support/users/fantasyworld/)
 * (@fantasyworld)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include-post-excerpt/#post-703375)
 * You want this plugin can count the post views times when you use `the_excerpt();`
   function to display.
    The most easy way is find 　`add_filter('the_content', '
   process_postviews');` and add the code 　`add_filter('the_excerpt', 'process_postviews');`
   after what you find
 * I will do more test, and release a new version
 *  Thread Starter [johnep](https://wordpress.org/support/users/johnep/)
 * (@johnep)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include-post-excerpt/#post-703384)
 * What I really need to do is display the post content (ONLY before the <!–more–
   > tag). I am able to add the entire post content by using “post_content”, however
   I just want to display the content before the <!–more–>…
 * I have to edit something here (line 151 in postviews.php):
 *     ```
       if($chars > 0) {
       				foreach ($most_viewed as $post) {
       					$post_title = htmlspecialchars(stripslashes($post->post_title));
   
       					$post_views = intval($post->views);
       					$post_views = number_format($post_views);
       					$temp .= "<li><a href=\"".get_permalink()."\">".snippet_chars($post_title, $chars)."</a></li>\n";
   
       				}
       			} else {
       				foreach ($most_viewed as $post) {
       					$post_title = htmlspecialchars(stripslashes($post->post_title));
   
       					$post_views = intval($post->views);
       					$post_views = number_format($post_views);
       					$temp .= "<li><a href=\"".get_permalink()."\">$post_title</a></li>\n";
   
       				}
       ```
   
 *  Thread Starter [johnep](https://wordpress.org/support/users/johnep/)
 * (@johnep)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include-post-excerpt/#post-703401)
 * I cannot find `add_filter('the_content', 'process_postviews');`
 *  [Richer Yang](https://wordpress.org/support/users/fantasyworld/)
 * (@fantasyworld)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-post-excerpt/#post-703497)
 * Sorry To You!
    I think you are using [WP-PostViews](http://wordpress.org/extend/plugins/wp-postviews/#post-370)
   From Lester ‘GaMerZ’ Chan. It,s not the same.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Include Post Excerpt ?’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [Richer Yang](https://wordpress.org/support/users/fantasyworld/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/include-post-excerpt/#post-703497)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
