Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    You could use the jetpack_relatedposts_filter_date_range filter to narrow down results a bit. Try adding this to your theme’s functions.php file, or in a functionality plugin:

    function jetpackme_related_posts_past_year_only( $date_range, $post_id ) {
        // We can change this based on $post_id too but let's just filter everything
        $date_range = array(
            'from' => strtotime( '-1 year' ),
            'to' => time(),
        );
        return $date_range;
    }
    add_filter( 'jetpack_relatedposts_filter_date_range', 'jetpackme_related_posts_past_year_only' );

    I hope this helps.

    Thread Starter putukas01

    (@putukas01)

    nope. didnt help 🙁 it didn’t show any posts, also no errors.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    t didn’t show any posts, also no errors.

    Could you post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    Thread Starter putukas01

    (@putukas01)

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I had a look at your site, and the Related Posts seem to be displayed properly. I also looked at some of your most recent posts, but I couldn’t find any old Related Post for these posts.

    If you still experience issues, could you send me a link to the post where you see Related Posts that were published more than a year before that one?

    Hi jeremy,

    I have try this, but i got error..
    please help..
    thanks

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    @jobbatam Could you post again in the thread you started earlier, let me know the exact code you used, and give me a few examples of pages where you see Related Posts that shouldn’t be there?

    If you want your site URL to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘jetpack – related posts’ is closed to new replies.