Php 获取对未定义函数vc_set_template_dir()的致命错误调用
我刚刚将WP Bakery Page Builder插件更新为最新版本,并得到了这个致命错误Php 获取对未定义函数vc_set_template_dir()的致命错误调用,php,wordpress,Php,Wordpress,我刚刚将WP Bakery Page Builder插件更新为最新版本,并得到了这个致命错误 调用第272行/home/xxx/public\u html/wp content/themes/theme/functions.php中未定义的函数vc\u set\u template\u dir() 下面是functions.php文件第272行的代码 $vcdir = get_stylesheet_directory() . '/customvc/vc_templates/'; vc_s
调用第272行/home/xxx/public\u html/wp content/themes/theme/functions.php中未定义的函数vc\u set\u template\u dir()
下面是functions.php
文件第272行的代码
$vcdir = get_stylesheet_directory() . '/customvc/vc_templates/';
vc_set_template_dir( $vcdir );
vc\u set\u template\u目录
函数正在产生问题。正如Jamie\u D所说,您需要用vc\u set\u模板目录替换vc\u set\u template\u目录函数。他的答案有一个小的打字错误。这是文件
e、 g
vc\u set\u template\u目录
和vc\u set\u template\u目录
不一样。。。请检查函数名抱歉,它的vc\u set\u template\u dir。正如我在问题中复制的代码。根据,您可以通过将函数名vc\u set\u template\u dir
替换为vc\u set\u shortcode\u template\u dir
$vcdir = get_stylesheet_directory() . '/customvc/vc_templates/';
vc_set_shortcodes_templates_dir( $vcdir );