Yudhistira Mauris on "[Plugin: Easy Post Series] Series box on excerpts for other posts"

ساخت وبلاگ

faeldray
Member
Posted 8 months ago #

Sorry to bother you again but I came across another minor issue. It's not likely to be a common problem because I don't see this often used in other themes. Still, I thought you might like to know about it.

Instead of the regular "Next post/previous post" navigation on my single.php template, I've included the post thumbnail and an excerpt for each next/previous post. (See the bottom of this post for an example.)

The issue is that if the post you're currently looking at belongs to a series, the series box is duplicated onto the excerpt for the next/previous posts. I've hid it with CSS but it's still there in the code. I took a look at your plugin code and I didn't see a reference to the_excerpt() so I'm not sure how it's getting added in.

The code I'm using for the excerpt looks something like this:
<?php setup_postdata( $nextPost ); the_excerpt(); wp_reset_postdata(); ?>

The full code for this custom navigation can be seen here.

https://wordpress.org/plugins/easy-post-series/

The post navigation is added to a post via the_content filter hook. the_excerpt() function might pull the navigation from that hook. You may try to customize my plugin by adding a priority number to the function that is attached to the_content hook. The function is located in setup_hooks function. Something like this:

add_filter( 'the_content', array( $this, 'series_post_navigation' ), 99 );

Let me know if it works.

faeldray
Member
Posted 8 months ago #

Nope, the series box is still there.

Hi faeldray,

Have you updated the plugin to the version 1.1.2? Does it fix the problem?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 121 تاريخ : سه شنبه 21 ارديبهشت 1395 ساعت: 15:01