• Hi,

    I am using to Directories Pro plugin to display businesses as custom post types.

    These listings when assigned an author disable the plugin’s ability to allow someone to claim the listing. The plugin has a setting to remove an author but your plugin overrides this so that there is always one author assigned when I want none.

    Is there a way to exclude certain custom post types from the plugin?

    Thanks,

    Paul

Viewing 1 replies (of 1 total)
  • Hi Paul,

    Is there a way to exclude certain custom post types from the plugin?

    Yes, there is 🙂
    You can use the filter coauthors_supported_post_types and unset the un-wished post types. For example, to exclude a post type named business, you could have something like this in your theme functions.php file:

    add_filter( 'coauthors_supported_post_types', 'cap_remove_business_post_type' );
    function cap_remove_business_post_type( $post_types ) {
    	foreach( $post_types as $key => $value ) {
    		if( $value === 'business' ) {
    			unset( $post_types[$key] );
    		}
    	}
    
    	return $post_types;
    }

    Have a nice day,
    Stefano

Viewing 1 replies (of 1 total)

The topic ‘Disable for Custom Post Tyope’ is closed to new replies.