Is it possible to share a template file between WordPress themes? If so, where should I locate it? I didn't even manage to share a simple myfunctions.php file between theme templates. I tried putting the file in the wp-content/themes folder, but the include('../myfunctions.php'); fails to find the file. Am I overlooking something really simple that prevents this? Thanks.
1 Answer
AFAIK you can't "share files" between templates. You are looking for plugin functionality. However, if there is a WordPress specific way for doing this I would like to know too.
-
Ok thanks Byte, I was surprised it looks difficult, I hate having to put same template file in each theme folder. an update nightmare - I will try some more experiments. Aug 4, 2016 at 22:11
-
1I think he solution is here, a plugin, but all details are nicely explained sitepoint.com/the-ultimate-includerequire-script-for-wordpress Aug 4, 2016 at 23:46