[英]adding include into wordpress functions.php return
我有兩個腳本需要結合用於wordpress,基本上我自己的自定義共享此鏈接
將其放入the_content()
的函數;
add_filter( "the_content",'addstyling', 5 );
function addstyling($content){
global $post;
return ''.$content.'<br><br>Sharethis';
}
其他代碼只是文件中的html,可通過include進行使用:
include(TEMPLATEPATH . '/includes/share.php');
任何幫助都會很棒,我是PHP的新手
不太清楚您要問的是什么,但是如果您想要將包含文件添加到帖子中:
function addstyling($content){
global $post;
$share = file_get_contents(TEMPLATEPATH . '/includes/share.php');
return $share . $content . '<br><br>Sharethis';
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.