- Feb 26, 2019
- 175
- 216
- 43
I understand. But I'm using a child theme to include all my customizations and there is no danger of being overwritten with updates. I believe that this way is much better and safe than adding more and more plugins to Wordpress.As much as I know, it CAN be done by adding the code to theme functions.php. Besides, Code Snippets is a light weight plugin and there should be no issue in using it!
If you add it to the theme functions.php, it may get removed each time you update your theme, that's why I recommend using plugin.
Any case, it seems that it's not working, cause I've added the filter but I still can see the REST API call with Query Monitor. For now, I've commented out the code in WP Rocket, but I don't like the solution. That's why I've asked you about the place to put your code, I was thinking that it was my fault and that it should be placed somewhere else specific. But it seems that it's not the case. So, what I'm missing?