Move Jump to Recipe above featured image in Genesis

/** * 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

Move Jump to Recipe above featured image

/** * 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

Change Jump links to buttons

.tasty-recipes-quick-links a { border: 1px solid #000; background-color: #000; color: #fff; margin: 0 5px 5px; } /* Hover */ .tasty-recipes-quick-links a:hover { border: 1px solid #ccc; background-color: #ccc; color: #fff; } /* Hide the dots between buttons */ .tasty-recipes-quick-links a…Continue reading

Remove Unused JS

/** * 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

Lazy load YouTube videos in WordPress with Shortcode (copy)

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

Remove Gutenberg Blocks Library CSS

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

Prevent Tasty Links inside Tasty Recipes

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