Leave Tasty recipe ratings with WP-PostRatings

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

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

TOC before first heading

/** * TOC After First Heading */ function cwp_toc_after_first_heading( $output, $block ) { if ( ‘core/heading’ !== $block[‘blockName’] ) { return $output; } global $wp_query; if ( ! $wp_query->in_the_loop ) { return $output; } // Only run once. remove_filter( ‘render_block’,…Continue reading

CWP – MailChimp RSS email ID

/** * RSS feed, add MailChimp email query string */ function cwp_rss_mailchimp_email( $url ) { return add_query_arg( ‘adt_ei’, ‘*|EMAIL|*’, $url ); } add_filter( ‘the_permalink_rss’, ‘cwp_rss_mailchimp_email’ );Continue reading

CWP – ConvertKit RSS email ID

/** * RSS feed, add ConvertKit email query string (Part 1) */ function cwp_rss_convertkit_email( $url ) { return add_query_arg( ‘adt_ei’, ‘subscriber.email_address’, $url ); } add_filter( ‘the_permalink_rss’, ‘cwp_rss_convertkit_email’ ); /** * Modify ConvertKit email string (Part 2) * esc_url will remove…Continue reading