How to include WordPress functions in custom .php file?

前端 未结 6 1085
猫巷女王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:10

    External files can easily access the WordPress functions. You just need to include the file wp-load.php in your external file. The wp-load.php file is located in root of your WordPress installation. Example: Suppose your file is test.php located at root directory of WordPress installation.

    
    

    Source: How to access WordPress functions in external file

提交回复
热议问题