Hide plugins and comments in custom type
I created a custom post type in Wordpress as follow:
function magazine_custom_type() {
$labels = array(
'name' => _x( 'Magazines Types', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Magazine Type', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Revista', 'text_domain' ),
'parent_item_colon' => __( 'Revista padre:', 'text_domain' ),
'all_items' => __( 'Todos las revistas', 'text_domain' ),
'view_item' => __( 'Ver revista', 'text_domain' ),
'add_new_item' => __( 'Agregar revista', 'text_domain' ),
'add_new' => __( 'Agregar nuevo', 'text_domain' ),
'edit_item' => __( 'Modificar', 'text_domain' ),
'update_item' => __( 'Actualizar', 'text_domain' ),
'search_items' => __( 'Buscar', 'text_domain' ),
'not_found' => __( 'No encontrado', 'text_domain' ),
'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ),
);
$args = array(
'label' => __( 'magazine_post_type', 'text_domain' ),
'description' => __( 'Magazine Post Type', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', ),
'taxonomies' => array( 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'fa fa-thumb-tack',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'magazine_post_type', $args );
}
// Hook into the 'init' action
add_action( 'init', 'magazine_custom_type', 0 );
I also created a
single-magazine_custom_type
that acts as a template for this post type but since it's a post type then some plugins are displayed there and also
Facebook Comment
box which I don't want. Is there any way to avoid this behavior?
Solutions
Thats the problem of the most plugins.
You only can check if the plugin provided settings or filter/hooks for that. Check out the
readme.txt
or check out the Plugin FAQ on wordpress.org
If you cant solve the problem, you must use an another plugin.
edit
Check out if your
plugin hooks
the_content
, you can try to use
print get_the_content()