Support » Plugin: Custom Post Types Relationships (CPTR) » 2.5.1 not displaying excerpt on WP4.9.4

  • Hi – LOVE this plugin, been using it for a long time. After the latest update to 4.9.1, the excerpts aren’t displaying, just an ellipsis. I checked all the new plugin settings, reset things, not working. Any advice?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Anastis Sourgoutsidis

    (@anastis)

    Hi there,

    there’s no reason why it wouldn’t work in 4.9.1 or later, as there are no significant changes affecting the content/excerpt of posts. In fact it works fine in my 4.9.4 installation.

    Please note that while the plugin says “excerpt”, it doesn’t actually use the native excerpt field, but generates a short preview based on the posts’ content.

    Perhaps a new or updated plugin (or theme) interferes?
    Could you momentarily disable your plugins (except this one) and see if the problem persists? If the problem goes away, you can then enable your plugins one by one, checking if the problem re-appears to pinpoint the plugin that’s causing this.

    Let us know of your results.

    Hi Anastis,

    It turned out to be a shortcode plugin that came with the theme. I disabled and got a page builder plugin instead.

    Regarding the excerpt – is there any way I can get more control over that? I would love for it to pull from the excerpt field directly.

    Thanks in advance for any help!

    Plugin Author Anastis Sourgoutsidis

    (@anastis)

    Really sorry, I never got a notification for your message.

    Indeed, pulling from the excerpt or in fact, following exactly how WordPress handles the excerpt is indeed the best way to go.

    I really don’t remember why it’s implemented the way it’s implemented, but I’m pretty certain that the decision was correct at the time it was taken. I think it’s time for an update though.

    I’ll try to give the plugin a refresh in the near future.
    Until then, you can try the following:
    Edit the file cptr.php, lines 440-443 are:

    
    if ( $att['excerpt'] == true ) {
    	$the_excerpt = _cptr_create_excerpt( $post->post_content, $att['words'] );
    	$text        .= '<p>' . $the_excerpt . '</p>';
    }
    

    Replace them with:

    
    if ( $att['excerpt'] == true ) {
    	$text .= apply_filters( 'the_excerpt', get_the_excerpt() );
    }
    

    Note that this might not be how I’ll actually implement it though, so your results might differ a bit from what it’ll actually be on a future update.

    No worries — I wound up deleting the “if” statement, and just putting in a get_the_excerpt call instead.

    I look forward to your next update!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2.5.1 not displaying excerpt on WP4.9.4’ is closed to new replies.