Instantly share code, notes, and snippets.

View disable-gutenberg-wordpress-5
/**
*
* Disable Gutenberg Editor for all post types
*
*/
// disable for posts
add_filter('use_block_editor_for_post', '__return_false', 10);
// disable for post types
View execute-php-wp-widget.txt
/**
*
* Executing PHP code in WordPress text widget
*
*/
function execute_php($html){
if(strpos($html,"<"."?php")!==false){
ob_start();
eval("?".">".$html);
View add-body-class-wp-posts-no-featured-image.txt