Lazy Load
add_action(‘wp_head’, ‘custom_lazyload_script’); function custom_lazyload_script(){ ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action(‘wp_head’, ‘custom_lazyload_script’); function custom_lazyload_script(){ ?>Continue reading
function homelink(){ $homelink = ‘Home‘; return $homelink;} function shoplink() { return ‘Shop‘;} function discoverlink() { $discoverlink = ‘Discover STUDEX®‘; return $discoverlink; } function bloglink() { $bloglink = ‘Trend Blog‘; return $bloglink; } function b2blink() { $b2blink = ‘STUDEX® B2B‘; return…Continue reading
add_filter( ‘intermediate_image_sizes_advanced’, function( $sizes ) { // Disable specific thumbnail sizes, uncomment the ones you want to disable. unset( $sizes[‘thumbnail’] ); // 150px x 150px // unset( $sizes[‘medium’] ); // 300px x 300px unset( $sizes[‘medium_large’] ); // 768px x 0px…Continue reading
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading
function custom_dashboard_widget() { echo ‘ Për cdo pytje rreth webfaqes ju lutem na kontaktoni. Website: Mjellma.al Email: [email protected] Phone Number: +383 49 844 249 ‘; } function add_custom_dashboard_widget() { wp_add_dashboard_widget( ‘custom_dashboard_widget’, ‘Shërbimi i ndihmës.’, ‘custom_dashboard_widget’ ); } add_action(‘wp_dashboard_setup’, ‘add_custom_dashboard_widget’);Continue reading
// legacy – for CPT-based orders add_filter( ‘manage_edit-shop_order_columns’, ‘misha_order_items_column’ ); // for HPOS-based orders add_filter( ‘manage_woocommerce_page_wc-orders_columns’, ‘misha_order_items_column’ ); function misha_order_items_column( $columns ) { // let’s add our column before “Total” $columns = array_slice( $columns, 0, 4, true ) // 4…Continue reading
function add_user_role_to_body_classes( $classes ) { global $current_user; foreach ( $current_user->roles as $user_role ) { if ( is_admin() ) { $classes .= ‘ role-‘ . $user_role; } else { $classes[] = ‘role-‘ . $user_role; } } return $classes; } add_filter( ‘body_class’,…Continue reading
add_action( ‘pre_ping’, function( &$links ) { $home = get_option( ‘home’ ); foreach ( $links as $l => $link ) { if ( 0 === strpos( $link, $home ) ) { unset( $links[ $l ] ); } } } );Continue reading
remove_action(‘wp_head’, ‘wlwmanifest_link’);Continue reading
// Register Custom Taxonomy function register_custom_foodtype() { $labels = array( ‘name’ => _x( ‘Food Types’, ‘Taxonomy General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Food Type’, ‘Taxonomy Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Food Type’, ‘text_domain’ ), ‘all_items’ => __(…Continue reading