How to include WordPress functions in custom .php file?

前端 未结 6 1095
猫巷女王i
猫巷女王i 2020-11-28 05:56

How can I include WordPress functions in a custom .php file?

In detail: I have a directory under my theme (Constructor) named reports. These contain

6条回答
  •  没有蜡笔的小新
    2020-11-28 06:23

    Well if someone has newer PHP versions installed (ver >= 5.5.x) then they can also try the below code in the root script in WordPress website directory itself:

    Or

    I guess this is a more direct and clean approach and doesn't involve manually adding slashes and changing diretories by ...

    Hope this helps someone.

提交回复
热议问题