Hi there,
I cannot seem to remove related posts from our portfolio pages. I’ve tried various css codes, our wordpress backend does not have an option to fully disable. I can only remove the date and thumbnails as the theme and wordpress allows, but not the tag links.
Please advise.
Hi brookemagana,
The related posts seems to be coming from Jetpack.
You can remove it in Jetpack > Settings > Traffic > uncheck Show related content after posts
If that isn’t working, try adding this in functions.php:
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_action( 'wp', 'jetpackme_remove_rp', 20 );
For further information, go to their documentation: https://jetpack.com/support/related-posts/customize-related-posts/#delete
Or you can hide it via CSS, by adding this in Enfold > General Styling > Quick CSS:
#jp-relatedposts {
display: none !important;
}
Hope it helps.
Best regards,
Nikko