[英]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.