Title: [Plugin: Custom Post Widget] Remove &quot;Insert Content Block&quot; button from page editor?
Last modified: August 20, 2016

---

# [Plugin: Custom Post Widget] Remove "Insert Content Block" button from page editor?

 *  Resolved [fizzlederp](https://wordpress.org/support/users/fizzlederp/)
 * (@fizzlederp)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-widget-remove-insert-content-block-button-from-page-editor/)
 * Hi,
 * I love this plugin, but I only want to use it for widget areas, and I want to
   prevent suers from being able to insert content blocks into pages and posts.
 * Is there an easy way to remove the button that appears above the page editor,
   next to Upload/Insert and Add Media?
 * Thanks!
 * [http://wordpress.org/extend/plugins/custom-post-widget/](http://wordpress.org/extend/plugins/custom-post-widget/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Johan van der Wijk](https://wordpress.org/support/users/vanderwijk/)
 * (@vanderwijk)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-widget-remove-insert-content-block-button-from-page-editor/#post-2950173)
 * Hi fizzlederp,
 * This is the code block that adds the icon:
 *     ```
       // Only add content_block icon above posts and pages
       function check_post_type_and_remove_media_buttons() {
       	global $current_screen;
       	if( 'content_block' != $current_screen->post_type ) add_filter('media_buttons_context', 'add_content_block_icon' );
       }
       add_action('admin_head','check_post_type_and_remove_media_buttons');
       ```
   
 * You could try to override this in your theme’s function.php file or simply delete
   the above code from the plugin code. As any changes to the plugin code will be
   undone when updating the plugin, using the functions.php file is preferable.
 *  Thread Starter [fizzlederp](https://wordpress.org/support/users/fizzlederp/)
 * (@fizzlederp)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-widget-remove-insert-content-block-button-from-page-editor/#post-2950265)
 * Thanks. That’ll do for me!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Custom Post Widget] Remove "Insert Content Block" button from
page editor?’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-widget/assets/icon.svg?rev=2884166)
 * [Content Blocks (Custom Post Widget)](https://wordpress.org/plugins/custom-post-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-widget/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [fizzlederp](https://wordpress.org/support/users/fizzlederp/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-widget-remove-insert-content-block-button-from-page-editor/#post-2950265)
 * Status: resolved