Skip to content

Snippet: Enable Social Sharing On Custom Post Types

// Enable Social Sharing On Custom Post Types
add_filter( 'wpex_has_social_share', function( $bool ) {
	if ( is_singular( 'YOUR_POST_TYPE_NAME' ) ) {
		$bool = true;
	}
	return $bool;
}, 40 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top