Post Types

All custom post types are registered by using register_post_type() function. So first of all make sure that you are familiar with function’s arguments. Please check the register_post_type() documentation.

Custom post types are stored in includes/post-types/class-realia-post-type-POST_TYPE_NAME-.php files. Plugin is using definition() static method for implementation.

Disabling custom post type

Below you can see an example how to disable custom post type. The logic is quite logic. You have to just unregister action responsible for registering custom post type. So for example, if we don’t need transactions custom post type just use code below.

remove_action( 'init', array(
    'Realia_Post_Type_Transaction', 'definition'
) );

First element in array is a class registering custom post type and second one is a static method with implementation