Title: [Plugin: Posts per Cat] Problems with Excerpts
Last modified: August 19, 2016

---

# [Plugin: Posts per Cat] Problems with Excerpts

 *  [lambda89](https://wordpress.org/support/users/lambda89/)
 * (@lambda89)
 * [16 years ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/)
 * Hi, anyone willing to listen.
 * I’ve installed the PPC-plugin, and it works flawlessly; except for one minor 
   detail; the excerpts. Neither when I choose “for all” or “for first”, any excerpt
   shows.
 * I’ve been looking at, and to small amounts modified, the code. For one thing,
   I translated the comments and one variable name to English (GT said it was croation,
   is that correct?), to make it easier for us at my company to maintain the app
   we’re building.
 * Anyhow, has anyone else experienced this bug, and is there a workaround? I’m 
   not so keen on messing around in other people’s data-structures, so modifying
   that without guidance feels like a big no-no.
 * Best regards
 * Rickard Lund
 * [http://wordpress.org/extend/plugins/posts-per-cat/](http://wordpress.org/extend/plugins/posts-per-cat/)

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

 *  Thread Starter [lambda89](https://wordpress.org/support/users/lambda89/)
 * (@lambda89)
 * [16 years ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1512936)
 * I can add to this that the “summary” (excerpt) **is** printed properly. Though,
   it’s an empty string.
 * I verified this by concatinating in two !! into the echo of it.
 * This leads me to think that there might have something to do with the parameters:
 * `if ( $ppc_excleng && mb_strlen_dh($clanak->post_excerpt) > ($ppc_excleng+1) ){
   $summary = substr_utf8($clanak->post_excerpt, 0, $ppc_excleng)."&hellip;"; } 
   else { $summary = $clanak->post_excerpt;}`
 * I would like to know; where does $clanak->post_excerpt come from? Is that a wordpress-
   parameter? ($clanak means “$post” or “$article”, by the way).
 *  [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1513191)
 * OffTopic: I must to translate all comments and vars to English (not it’s in Serbian)
   🙂
 * OnTopic: `$clanak->post_excerpt` is almost same as function `the_excerpt()`, 
   but returns excerpt content to string, don’t print it out.
 * `$clanak` means `$post`, and `post_excerpt` is [field](http://codex.wordpress.org/Database_Description#Table:_wp_posts)
   from table `wp_posts`.
 *  [mikeashton](https://wordpress.org/support/users/mikeashton/)
 * (@mikeashton)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1513207)
 * I too have had this issue, but I don’t understand the author’s answer. Do I need
   to adjust the code or are the excerpts simply not going to show up?
 * Thanks,
 * Mike
 *  [Coveneye](https://wordpress.org/support/users/coveneye/)
 * (@coveneye)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1513210)
 * Hi, tried my hands on this plugin yesterday. Don’t know if your problem was mine,
   but in my case WordPress 3.1 doesn’t automatically create the content for post_except
   field in the database, so the querry for post_excerpt field returns an empty 
   string.
 * To solve the problem, you could turn Excerpt field on in the Screen View option
   panel for your posts and create the Excerpt manually.
 * If you don’t want to going through that all the time, then go to line 328 and
   replace this:
    `if ( $ppc_excleng && mb_strlen_dh($clanak->post_excerpt) > ($
   ppc_excleng+1) ) { $sazetak = substr_utf8($clanak->post_excerpt, 0, $ppc_excleng)."&
   hellip;"; } else { $sazetak = $clanak->post_excerpt;}`
 * with this:
    `if ( $ppc_excleng && mb_strlen_dh($clanak->post_content) > ($ppc_excleng
   +1) ) { $sazetak = substr_utf8($clanak->post_content, 0, $ppc_excleng)."&hellip;";}
   else { $sazetak = $clanak->post_content;}`
 * That would make the plugin take content in “post_content” field in stead of post_excerpt
   field to process, so you won’t have to bother with post_excerpt every time.
 * Good luck!
 *  [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1513212)
 * What about new option in settings to use post_content in stead of post_excerpt
   w/o code hacking?

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

The topic ‘[Plugin: Posts per Cat] Problems with Excerpts’ is closed to new replies.

 * 5 replies
 * 4 participants
 * Last reply from: [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-per-cat-problems-with-excerpts/#post-1513212)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
