Remove Default jQuery

// Remove default WordPress jquery wp_deregister_script( ‘jquery’ ); //Remove jquery migrate add_action( ‘wp_default_scripts’, ‘remove_jquery_migrate’ ); function remove_jquery_migrate( $scripts ) { if ( ! is_admin() && isset( $scripts->registered[‘jquery’] ) ) { $script = $scripts->registered[‘jquery’]; if ( $script->deps ) { $script->deps =…Continue reading

Remove Post Title from Yoast Breadcrumbs

// Remove post title from yoast breadcrumbs add_filter(‘wpseo_breadcrumb_single_link’, function( $link_output) { if( strpos( $link_output, ‘breadcrumb_last’ ) !== false ) { $link_output = ”; } return $link_output; } );Continue reading

Disable Auto-generated Image Sizes

// Disable Auto Generated Images Sizes add_action(‘intermediate_image_sizes_advanced’, ‘disable_image_sizes’); function disable_image_sizes($sizes) { //unset($sizes[‘thumbnail’]); //unset($sizes[‘medium’]); //unset($sizes[‘large’]); unset($sizes[‘medium_large’]); unset($sizes[‘1536×1536’]); unset($sizes[‘2048×2048’]); return $sizes; } add_action(‘init’, ‘disable_other_image_sizes’); function disable_other_image_sizes() { remove_image_size(‘post-thumbnail’); remove_image_size(‘another-size’); } add_filter(‘big_image_size_threshold’, ‘__return_false’);Continue reading

Disable Enter Key in WPForms

/** * Disable the Enter key for WPForms forms * * @link https://wpforms.com/developers/how-to-stop-the-enter-key-from-submitting-the-form/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_disable_enter_all_wpforms( ) { ?>Continue reading

Hide Branda

function remove_menus(){ $current_user = wp_get_current_user(); if( ‘[email protected]’ !== $current_user->user_email){ remove_menu_page( ‘branding’ ); } } add_action( ‘admin_init’, ‘remove_menus’ );Continue reading

Leave Tasty recipe ratings with WP-PostRatings

// Disable standard ratings UI add_filter( ‘tasty_recipes_enable_ratings’, ‘__return_false’ ); /**  * Filter template variables to render WP-PostRatings UI  * within the recipe card.  *  * @param array $template_vars Variables to be passed to the template.  * @param object $recipe  …Continue reading