📜  在外部 php 文件中使用 wordpress 函数 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.175000             🧑  作者: Mango

代码示例1
//add to the file that needs to use wordpress functions.
require_once("../../../../wp-load.php");
//or
require_once(rtrim($_SERVER['DOCUMENT_ROOT'], '/') . '/wp-load.php');