Ok… found part of the problem… this plugin will not ‘fake’ an excerpt if one does not all ready exist… So, I added to code to fake the excerpt if one does not exist:
function bib_excerpt($text) {
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text);
$words = explode(' ', $text, 101);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, '<!--more-->');
$text = implode(' ', $words);
}
return apply_filters('the_excerpt', $text);
}
function bib_process_excerpt($post) {
//var_dump($post);
$output = ($post->post_excerpt == '') ? (bib_excerpt($post->post_content))
: (apply_filters('the_excerpt', $post->post_excerpt));
if ( post_password_required($post) ) {
$output = __('There is no excerpt because this is a protected post.');
return $output;
}
#return apply_filters('get_the_excerpt', $output);
return $output;
}
Now my problem is this… I can not get the plugin to process the more tag properly. In the fake excerpt I did insert the more tag at the end. The tag is stripped and not displayed to the reader, but no “continue reading…” or “more >>” is displayed, no link. If I change this code:
‘
$data[‘post_content’] = wpautop(wptexturize($post->post_content));
$data[‘post_excerpt’] = wpautop(wptexturize(bib_process_excerpt($post) ));
‘
to this:
‘
$data[‘post_content’] = wpautop(wptexturize($post->post_content));
$data[‘post_content’] = wpautop(wptexturize(bib_process_excerpt($post) ));
‘
it works, but will then also attach the new more link text to ALL posts, even those that were not really truncated….
I am guessing the fix is to add the following settings:
“Force Excerpt if none.”
“Force Excerpt to X words”
Then, if the value is set the following code is performed:
‘
$data[‘post_content’] = wpautop(wptexturize(bib_process_excerpt($post) ));
‘
And This function would need to count the words, if fewer then the cut-off do not add the more tag…