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)."…"; } 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).
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 from table wp_posts.
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
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)."…"; } 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)."…"; } 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!
What about new option in settings to use post_content in stead of post_excerpt w/o code hacking?