开发者

Adding a new file and calling functions from that file yields undefined function add_action()

I am adding a new file called subtypes.php to my theme /library/includes in order to allow for a dynamic dropdown list. This file uses functions from /library/functions/custom_functions.php.

The problem: whenever I call any function from custom_functions.php, I get fatal errors: Call to undefined function add_action(), other times I get undefined function get_option(). It seems to me that the new file doesn't load some default 开发者_高级运维libraries or so....Any help willl be very much appreciated.

Thank you very much!


Put include_once "../functions/custom_functions.php" at the top of subtypes.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜