Skip to content

Instantly share code, notes, and snippets.

View gabydevdev's full-sized avatar

Gabriela Carral gabydevdev

View GitHub Profile
@gabydevdev
gabydevdev / functions.php
Last active August 1, 2025 20:12
Disable block editor for widgets and enable classic widget editor.
<?php
/**
* Disable block editor for widgets and enable classic widget editor.
*
* @since 1.0.0
* @return void
*/
function disable_block_editor_for_widgets() {
remove_theme_support( 'widgets-block-editor' );
@gabydevdev
gabydevdev / functions.php
Created August 1, 2025 20:13
Disable Gutenberg editor for post types.
<?php
/**
* Disable Gutenberg editor for post types.
*
* @param bool $use_block_editor Whether to use the block editor.
* @param string $post_type The post type being edited.
* @return bool
*/
function disable_gutenberg( $use_block_editor, $post_type ) {