Any time you add a custom PHP function to your site, either insert it in the WPCode plugin (recommended), a child theme’s functions.php, or your own custom plugin. If you’re not familiar with using WordPress filters, you can find more details in the WordPress docs.