Related posts disappeared. Div is there, but it's empty
-
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]' ); } ?>
Viewing 5 replies - 1 through 5 (of 5 total)
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.