• Resolved Tess Needham

    (@tessfromoz)


    [Plugin: Advanced Most Recent Posts Mod]

    Hi there,

    This plugin is working great but there’s one problem I’m having – the automatically generated excerpts are cutting off in the middle of sentences. I’d like to have it use custom excerpts instead. Can this be done through a code hack, or will I need to use a different plugin?

    Thanks
    Tessa

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kailey (trepmal)

    (@trepmal)

    On line 418/19 of adv-most-recent.php there should be a line like this:

    $excerpt = $separator . ($spot == 'spot3' ? '<span class="date">'.$time.'</span> ' : '') . $excerpt . $afterexcerpt_html;

    Replace that with this:

    if ( ! empty( $post->post_excerpt ) )  {
    	$excerpt = $separator . ($spot == 'spot3' ? '<span class="date">'.$time.'</span> ' : '') . $post->post_excerpt;
    }
    else {
    	$excerpt = $separator . ($spot == 'spot3' ? '<span class="date">'.$time.'</span> ' : '') . $excerpt . $afterexcerpt_html;
    }

    The new code does this: If the custom post excerpt has been set, use that and ignore whatever has been set for the “after excerpt” text (change that if you wish, but the typical ‘…’ wouldn’t make sense here). Otherwise, if the custom excerpt hasn’t been set, proceed as usual.

    Thread Starter Tess Needham

    (@tessfromoz)

    You are amazing! Thank you!

    Plugin Author Kailey (trepmal)

    (@trepmal)

    I do my best!

    Glad to help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to use custom excerpt rather than automatic?’ is closed to new replies.