Open graph

// Add this to your theme’s functions.php file or a custom plugin // Disable AIOSEO Open Graph if you’re keeping another plugin/theme for it add_filter(‘aioseo_disable_opengraph’, ‘__return_true’); // If your theme generates Open Graph tags and you want to disable them…Continue reading

kindle

Why the 2024 Kindle Paperwhite Is the Best E‑Reader Yet Looking for your next e‑reader? Amazon’s 2024 Kindle Paperwhite series raises the bar with speedier performance, a crisper screen, and features that delight both casual readers and A‑listers alike. Disclosure:…Continue reading

Product order WooCommerce

// Force alphabetical sorting on all product pages add_action(‘woocommerce_product_query’, function($q) { if (is_shop() || is_product_category() || is_product_tag()) { $q->set(‘orderby’, ‘title’); $q->set(‘order’, ‘ASC’); } });Continue reading

Ngăn WP cắt ảnh

add_filter(‘intermediate_image_sizes_advanced’, function ($sizes) { $sizes = array( ‘thumbnail’ => $sizes[‘thumbnail’], // Giữ lại thumbnail ‘medium’ => $sizes[‘medium’], // Giữ lại medium //’medium_large’ => $sizes[‘medium_large’], // Giữ lại medium_large ‘large’ => $sizes[‘large’], // Giữ lại large //’1536×1536′ => $sizes[‘1536×1536′], // Giữ…Continue reading

Custom image sizes

add_theme_support( ‘post-thumbnails’); add_image_size( ‘image-480’, 480, 9999 ); add_image_size( ‘image-640’, 640, 9999 ); add_image_size( ‘image-720’, 720, 9999 ); add_image_size( ‘image-960’, 960, 9999 ); add_image_size( ‘image-1168’, 1168, 9999 ); add_image_size( ‘image-1440’, 1440, 9999 ); add_image_size( ‘image-1920’, 1920, 9999 ); function my_custom_sizes( $sizes…Continue reading

Custom Excerpt Length

add_filter(‘excerpt_length’, ‘custom_excerpt_length’, 999); function custom_excerpt_length($length) { return 20; // number of words. Default is 55. }Continue reading

Disable All Updates (copy) (copy)

add_filter( ‘site_transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘site_transient_update_themes’, ‘__return_empty_array’ ); add_filter( ‘transient_update_themes’, ‘__return_empty_array’ ); // Disable core wp updates. add_filter( ‘pre_site_transient_update_core’, function ( $object = null ) { global $wp_version; // Return an empty object to prevent extra…Continue reading