Disable WordPress Generator Meta Tag
remove_action( ‘wp_head’, ‘wp_generator’ ); // hide it from RSS add_filter( ‘the_generator’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
remove_action( ‘wp_head’, ‘wp_generator’ ); // hide it from RSS add_filter( ‘the_generator’, ‘__return_false’ );Continue reading
remove_action( ‘wp_head’, ‘adjacent_posts_rel_link_wp_head’ );Continue reading
remove_action( ‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
// Remove the REST API lines from the HTML Header remove_action(‘ wp_head’, ‘rest_output_link_wp_head’, 10 ); // completely disable json api // Filters for WP-API version 1.x add_filter( ‘json_enabled’, ‘__return_false’ ); add_filter( ‘json_jsonp_enabled’, ‘__return_false’ ); // Filters for WP-API version 2.x…Continue reading
remove_action( ‘wp_head’, ‘wlwmanifest_link’ );Continue reading
remove_action( ‘wp_head’, ‘rsd_link’ );Continue reading
add_filter( ‘heartbeat_settings’, function ( $settings ) { $settings[‘interval’] = 120; return $settings; } );Continue reading
remove_image_size( ‘1536×1536’ ); remove_image_size( ‘2048×2048’ );Continue reading
// [d] – inserts the current day with two digits e.g. 06 // [D] – inserts the current day with three letters e.g. Mon // [j] – inserts the current day without leading zeros e.g. 6 // [l] – inserts…Continue reading
function custom_vendor_term_link($url, $term, $taxonomy){ switch ($taxonomy) { case ‘vendor-location’: return home_url(‘/vendor/?_vendor_location=’ . $term->slug); case ‘vendor-category’: return home_url(‘/vendor/?_vendor_category=’ . $term->slug); case ‘vendor-pricing’: return home_url(‘/vendor/?_vendor_pricing=’ . $term->slug); case ‘vendor-zone’: return home_url(‘/vendor/?_vendor_zone=’ . $term->slug); case ‘vendor-identity-attribute’: return home_url(‘/vendor/?_vendor_identity_attributes=’ . $term->slug); default: return $url;…Continue reading