Toolonomy Logo
Last Updated on: October 1, 2022

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' );
0 Shares

Become a Toolonomy Community Member for Free!

Consider joining our Official Community Group if you want to get access to the exclusive insider content and information around the Exclusive Business Development Tools. Also, you will be able to get involved in interesting group discussions with like-minded people that are interested in similar topics as you.
Free Membership
Made with ❤ for Digital Entrepreneurs
Copyright © 2018 - 2022 SyncWin | All Rights Reserved.
Top crossmenu
0 Shares
Copy link
Powered by Social Snap