ByUs – Global snippets
add_shortcode(‘current-year’, function() { return date(‘Y’); });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_shortcode(‘current-year’, function() { return date(‘Y’); });Continue reading
add_action( ‘woocommerce_before_single_variation’, function() { if ( ! is_product() ) return; global $product; if ( ! $product ) return; $field_name = ‘uitleg_maten’; // ACF field name $taxonomy = ‘pa_merk’; // jouw attribute taxonomy $terms = taxonomy_exists( $taxonomy ) ? wp_get_post_terms( $product->get_id(),…Continue reading
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
remove_action(‘wp_head’, ‘wlwmanifest_link’);Continue reading
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
add_filter( ‘auth_cookie_expiration’, function () { return 30 * DAY_IN_SECONDS; // 30 days in seconds. } );Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading