1. Home
  2. Knowledge Base
  3. Tasty Links
  4. Filter: Have Tasty Links only appear in Tasty Recipes Cards

Filter: Have Tasty Links only appear in Tasty Recipes Cards

In Tasty Links version 1.3 and above, we have added this functionality to the auto-linking location(s) setting. You can now deselect pages and post types and leave recipes selected to only insert Tasty Links into your Recipe cards.

Limit auto-linking locations for Tasty Links

If you are using an older version of Tasty Links, use the following code snippet to prevent Tasty Links from appearing outside of your Tasty Recipes card.

Alternatively, you can limit auto-linking to the ingredients section of your recipe cards.

***Before doing this, make sure that you have access to your site's files via FTP (the editor in WordPress is not sufficient in case problems arise) and that you are comfortable with editing your functions.php file. Any minor error in the functions.php file can result in the “white screen of death,” which is easily fixed via FTP but is difficult to fix otherwise (and a nuisance as your site will be unavailable until fixed).***

/** * Disable Tasty Links except for on Tasty Recipes fields. */
add_filter( 'tasty_links_should_be_applied', function( $context ) {
return 'tasty-recipes' === $context;
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support