Disable related posts from showing on porfolio posts in Jetpack

Disable related posts from showing on porfolio posts in Jetpack on child sites.

Snippet Type

Execute on Child Sites

Snippet

function disable_jetpack_related_posts( $options ) {
    if ( isset( $options['enabled'] ) && is_singular( 'portfolio' ) ) {
        $options['enabled'] = false;
    }
    return $options;
}
add_filter( 'jetpack_relatedposts_filter_options', 'disable_jetpack_related_posts' );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.