- This topic has 2 replies, 2 voices, and was last updated 9 years, 9 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
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.
If you need technical support for your theme please file a ticket.
The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.
© 2023 WPEngine, Inc.