Copyright Year Shortcode
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
/** * Set the valid range for the list view. */ add_filter( ‘wfea_cal_list_options’ , function( $options ) { $options[‘fullcalendar’][‘validRange’] = array( ‘start’ => date( ‘Y-m-d’, strtotime( ‘-5 months’ ) ), // 5 months ago ‘end’ => date( ‘Y-m-d’, strtotime( ‘+5…Continue reading
/** * Set the valid range for the calendar view. */ add_filter( ‘wfea_cal_options’ , function( $options ) { $options[‘fullcalendar’][‘validRange’] = array( ‘start’ => date( ‘Y-m-d’, strtotime( ‘-5 months’ ) ), // 5 months ago ‘end’ => date( ‘Y-m-d’, strtotime( ‘+5…Continue reading
add_filter( ‘wfea_combined_date_time_date_format’, function ( $format ) { return ‘F j,Y @ H:i’; } , 999 );Continue reading
// Automatically Delete Woocommerce Images After Deleting a Product add_action( ‘before_delete_post’, ‘delete_product_images’, 10, 1 ); function delete_product_images( $post_id ) { $product = wc_get_product( $post_id ); if ( !$product ) { return; } $featured_image_id = $product->get_image_id(); $image_galleries_id = $product->get_gallery_image_ids(); if( !empty(…Continue reading
(function(callback) { if (document.readyState !== “loading”) { callback(); } else { document.addEventListener(“DOMContentLoaded”, callback); } })(() => { let tp_exclusions = document.querySelectorAll(‘img[src=”https://example.com/wp-content/uploads/2023/12/logo.png”]’); if ( tp_exclusions.length === 0 ) { return; } for( const tp_exclusion of tp_exclusions ) { tp_exclusion.dataset.pinNopin = ‘nopin’;…Continue reading