Skip to content

Instantly share code, notes, and snippets.

@devinsays devinsays/jetpack.php
Last active Jan 17, 2020

What would you like to do?
Query by JetPack Related Posts
* Prevents Related Posts from displaying in content area
function prefix_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', 'prefix_remove_rp', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.