Last Updated on: October 31, 2020

Disable Jetpack Related Posts for Specific CPTs [PHP Snippet]

0 Shares

If you want to disable Jetpack related posts for specific custom post types then this code snippet could be helpful to you to achieve just that.

Please Note: This snippet has been stopped working all of sudden and I would try to replace it with the working one as soon as I find the solution.

/* Advanced Scripts Method to Add This Snippet */

function sw_jetpack_disable_related_posts( $options ) {
    if ( is_singular( 'custom-post-type-name' ) ) {
        $options['enabled'] = false;
    }
    return $options;
}
add_filter( 'jetpack_relatedposts_filter_options', 'sw_jetpack_disable_related_posts' );
SyncWin Logo
SyncWin is a dedicated place to explore the Content, Discussions, & Useful Details around topics like Business, Technology, and Lifestyle to help you learn and grow in your life.
About Us
Made with ❤ for WinSyncers
Copyright © 2018 - 2025 by SyncWin | All Rights Reserved.
crossmenuarrow-right
0 Shares
Copy link