// Disable standard ratings UI add_filter( ‘tasty_recipes_enable_ratings’, ‘__return_false’ ); /** * Filter template variables to render WP-PostRatings UI * within the recipe card. * * @param array $template_vars Variables to be passed to the template. * @param object $recipe …Continue reading
/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_RecipesShortcodes::filter_the_content_late(…Continue reading
/** * Ensures the “Jump to Recipe” button is added to the content really late. */ add_action( ‘init’, function() { if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’,…Continue reading
add_filter( ‘tasty_recipes_min_rating_without_comment’, function() { return 6; // Require comments for 4 and 5 star ratings too. } );Continue reading
/** * We will Dequeue the jQuery UI script as example. * * Hooked to the wp_print_scripts action, with a late priority (99), * so that it is after the script was enqueued. */ function wp_remove_scripts() { // check if…Continue reading
function yt_shortcode_function( $atts = array() ) { // set up default parameters extract(shortcode_atts(array( ‘id’ => ‘test’ ), $atts)); return ‘ <iframe width="560" height="315" src="https://youtu.be/'. $id .'?autoplay=1" srcdoc=" * { padding:0; margin:0; overflow:hidden; } html,body { height:100%; } img,span { position:absolute;…Continue reading
function yt_shortcode_function( $atts = array() ) { // set up default parameters extract(shortcode_atts(array( ‘id’ => ‘test’ ), $atts)); return ‘Continue reading
add_filter( ‘woocommerce_cart_ready_to_calc_shipping’, function( $show_shipping ) { if ( is_cart() ) { return false; } return $show_shipping; }, 99 );Continue reading
function adms_remove_wp_block_library_css(){ wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); wp_dequeue_style( ‘wc-blocks-style’ ); // Remove WooCommerce block CSS } add_action( ‘wp_print_styles’, ‘adms_remove_wp_block_library_css’, 100 );Continue reading