• Resolved elainevdw

    (@elainevdw)


    I’m not quite sure when this happened, but the related posts I configured on a website’s blog are no longer showing. The javascript is in the header, and the container div is inserted where it’s supposed to go, but there are no posts.

    When I went to the Jetpack debugging page, it said “Your Jetpack setup looks a-okay!”

    Any ideas?

    Here’s a sample blog post that should have related posts after the content and before the categories/tags.

    The two functions I used are the ones for moving the related posts to a different part of the page, as detailed on the support page:

    function jetpackme_remove_rp() {
        if ( class_exists( 'Jetpack_RelatedPosts' ) ) {
            $jprp = Jetpack_RelatedPosts::init();
            $callback = array( $jprp, 'filter_add_target_to_dom' );
            remove_filter( 'the_content', $callback, 40 );
        }
    }
    add_filter( 'wp', 'jetpackme_remove_rp', 20 );

    and

    <?php
    if ( class_exists( 'Jetpack_RelatedPosts' ) ) {
        echo do_shortcode( '[jetpack-related-posts]' );
    }
    ?>

    https://www.ads-software.com/plugins/jetpack/

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

    (@jeherve)

    Jetpack Mechanic ??

    Could you try to install and activate this small plugin, by going to Plugins > Add New > Upload in your dashboard:
    https://i.wpne.ws/Vdoc

    Once you’ve activated the plugin, try to relaunch the indexation (you’ll find the reindex button by clicking on the “Debug” link at the bottom of the Jetpack menu in your dashboard).
    If the Related Posts start appearing, you can deactivate and delete this small plugin.

    Let me know if it helps.

    Thread Starter elainevdw

    (@elainevdw)

    Thank you Jeremy!

    I installed and activated the fix-it plugin, the went to Jetpack’s debug page and hit the button to reindex the posts.

    It took about an hour, and now it says “Posts indexed.” However, I still don’t see related posts on the blog.

    I double-checked that there aren’t any caching plugins (there aren’t, closest thing to caching on the site is Jetpack’s Photon).

    Also, my link was malformed above. Here it is again: https://goo.gl/YiSWO8

    Thread Starter elainevdw

    (@elainevdw)

    Wait a sec… it looks like older posts do, in fact, have related posts. But newer posts do not. Does this just mean that there are no “related” posts found for the ones that are missing them?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    You’ll need to give it some time for the indexation to complete. Related Posts should start appearing under each one of your posts within the next few hours. They actually already appear under the post you mentioned in your original post here.

    It looks like you’ll be all set! Let me know if you have more questions.

    Thread Starter elainevdw

    (@elainevdw)

    Oh, fantastic! You are 100% correct. Thank you so much for the easy fix, and also for the quick response. I really appreciate it!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Related posts disappeared. Div is there, but it's empty’ is closed to new replies.