Sold individualy for all products
add_filter( ‘woocommerce_is_sold_individually’, function ( $return, $product ) { return true; }, 10, 2 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘woocommerce_is_sold_individually’, function ( $return, $product ) { return true; }, 10, 2 );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
add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; – }Continue reading
function display_year() { $year = date(‘Y’); return $year; } add_shortcode(‘year’, ‘display_year’);Continue reading
add_action( ‘wfea_popup_scripts_enqueued’, function () { $script = ‘ wfeaModalCallback = function () { console.log(“There has been an Eventbrite checkout.”); // add your conversion tracking code here // end of tracking code };’; wp_add_inline_script( ‘widget-for-eventbrite-api-eb-popup’, $script, ‘after’ ); } );Continue reading
.staff-bio-section .staff-bio .bio p:first-child { color: var(–secondary-color); font-size: 1.25rem; } .single-staff .text a { color: var(–primary-color); } /* highlight */ .highlight { background: var(–primary-color); padding: 37px 40px; margin: 40px 0px; } .highlight h2:first-child, .highlight h2:first-child { margin-top: 0; color:#fff; }…Continue reading
add_shortcode( ‘qem_3_months’, function () { $out = ”; $display = \Quick_Event_Manager\Plugin\Core\Utilities::get_instance()->get_display_settings(); $m0 = do_shortcode( ‘[qem id=”current”]’ ); // get the next month numeral $next_month = gmdate( ‘n’, strtotime( ‘+1 month’ ) ); $m1 = do_shortcode( ‘[qem id=’ . $next_month .…Continue reading
elem = document.getElementsByClassName(‘uk-background-norepeat’); window.addEventListener(‘deviceorientation’, function(e){ handler(e); }, false); function handler(e){ var width = window.outerWidth, rot = e.gamma / 1800, left = ( width / 2 ) * rot; elem[0].style.backgroundPosition = left + ‘px’; }Continue reading