/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_Recipes\Shortcodes::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_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’,…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
add_action( ‘init’, function() { // Remove Tasty Links from Tasty Recipes description, notes, ingredients, and instructions. remove_filter( ‘tasty_recipes_the_content’, array( ‘Tasty_LinksIntegrationsTasty_Recipes’, ‘filter_tasty_recipes_content’ ) ); });Continue reading