2015-10-06 68 views
1

我是新來的PHP,並試圖通過Wordpress學習我的方式。在我的主題的functions.php文件中,我想訪問bbPress的插件template.php文件中可用的方法。我越來越"Unexpected token ['訪問Wordpress插件的模板方法

裏面的bbPress插件的template.php:

function bbp_topic_reply_count($topic_id = 0, $integer = false) { 
    echo bbp_get_topic_reply_count($topic_id, $integer); 
} 

我訪問我的當前主題的functions.php的這個功能:

$count = bbp_topic_reply_count(125); 

我必須包括什麼從插件(即bbpress/template.php)?訪問這些模板方法的正確方法是什麼?

謝謝。

回答

0

我認爲這個問題是因爲它是不是在我的functions.php

處理調用bbp_get_topic_reply_count()解決了我的問題「回聲」語句。