在大多数创世纪子主题中,存在以下代码行:
// Starts the engine.
require_once get_template_directory() . '/lib/init.php';据我所知,这包括创世纪父主题文件夹中的lib目录中的init.php文件。
我的问题很简单-为什么get_template_directory()返回创世纪父文件夹,而不是子主题文件夹?如果可能存在多个父主题,它如何识别?
发布于 2019-09-01 17:01:16
不可能有多个父主题。因为您通过模板指定父主题:创世纪。这有助于WordPress找到父主题。
https://wordpress.stackexchange.com/questions/345564
复制相似问题