Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP echo div类未显示_Php_Wordpress_Genesis - Fatal编程技术网

PHP echo div类未显示

PHP echo div类未显示,php,wordpress,genesis,Php,Wordpress,Genesis,我试图使用以下PHP(插入到我的子主题的functions.PHP中)将一个类从一个插件连接到另一个插件。当我检查我的代码时,我现在可以在我想要的钩子区域中看到该类,但是该类应该显示的元信息没有出现在我的实际站点上 有人能帮忙吗?蒂亚 add_action( 'gfwa_before_post_content', 'hook_events' ); function hook_events() { echo '<div class="tribe-events-event-meta">

我试图使用以下PHP(插入到我的子主题的functions.PHP中)将一个类从一个插件连接到另一个插件。当我检查我的代码时,我现在可以在我想要的钩子区域中看到该类,但是该类应该显示的元信息没有出现在我的实际站点上

有人能帮忙吗?蒂亚

add_action( 'gfwa_before_post_content', 'hook_events' ); 
function hook_events() {
echo '<div class="tribe-events-event-meta"></div>';
}
add_action('gfwa_-before_-post_-content','hook_-events');
函数hook_events(){
回声';
}

添加一个“die()”;在钩子函数中查看是否调用了它。如果不是,“hook”可能是函数名中的一个保留关键字。很抱歉,您能告诉我您想在哪里添加它吗?我对PHP相对缺乏经验,不想把它搞砸,哈哈。我假设我可以更改函数的名称,使它不包含那个词,对吗?