Move filter to a more appropriate function.php

Moved the filter to the function.php in the theme folder