Disable Pattern Directory
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
remove_action(‘wp_head’, ‘wlwmanifest_link’);Continue reading
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
add_filter( ‘auth_cookie_expiration’, function () { return 30 * DAY_IN_SECONDS; // 30 days in seconds. } );Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading
function wpcode_snippet_remove_query_strings_split( $src ) { $output = preg_split( “/(&ver|\?ver)/”, $src ); return $output ? $output[0] : ”; } add_action( ‘init’, function () { if ( ! is_admin() ) { add_filter( ‘script_loader_src’, ‘wpcode_snippet_remove_query_strings_split’, 15 ); add_filter( ‘style_loader_src’, ‘wpcode_snippet_remove_query_strings_split’, 15 ); }…Continue reading
function wpcode_snippet_oembed_defaults( $sizes ) { return array( ‘width’ => 400, ‘height’ => 280, ); } add_filter( ’embed_defaults’, ‘wpcode_snippet_oembed_defaults’ );Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading