1. Home
  2. Knowledge Base
  3. Tasty Links
  4. Filter: Move affiliate disclosure under the post title

Filter: Move affiliate disclosure under the post title

If you're interested in moving your affiliate disclosure to the very top of your post, above the Tasty Recipes Quick Links (Jump to Recipe and/or Print links) you can use this filter to add it in.

Just add in the following snippet to your theme's functions.php file:

***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).***

* Move the Tasty Links disclaimer above Tasty Recipes' Jump To links. 
    function( $content ) { 
        if ( false === stripos( $content, '<div class="tasty-links-general-disclaimer">' ) ) { 
            return $content; 
        // Remove the existing disclaimer text. 
        $content = preg_replace( '#<div class="tasty-links-general-disclaimer">(.+)</div>#Us', '', $content ); 
        // Add the disclaimer text again. 
        $content = \Tasty_Links\Frontend::append_or_prepend_disclosure_to_content( $content );
        return $content; 
Was this article helpful?

Related Articles

Need Support?

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