Is it possible to put a snippet in file (something.php) and call it in functions.php on appropriate place?
I mean, instead of pouring different codes for php in widget, adding fields in user bio, adding image sizes etc in functions.php, won’t it be a good idea to put all that in a seperate .php file and then call it in functions.php?
If yes then how?
It’s actually less efficient because there are more calls to separate files.
And yes, you can do it with php includes. That’s not WordPress specific, it’s just php.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.