In order to achieve what you actually want to do, I recommend you use hooks as the best way to edit WordPress as follows
Copyright © 2024 The Infinite Info