将include添加到wordpress functions.php return
我有两个脚本,我需要结合wordpress,基本上我自己的自定义共享这个链接 将其放入内容()中的函数将include添加到wordpress functions.php return,php,wordpress,include,Php,Wordpress,Include,我有两个脚本,我需要结合wordpress,基本上我自己的自定义共享这个链接 将其放入内容()中的函数 任何帮助都很好,我是PHP的新手,不太清楚你在问什么,但是如果你想在帖子中添加include文件: function addstyling($content){ global $post; $share = file_get_contents(TEMPLATEPATH . '/includes/share.php'); return $share . $conte
任何帮助都很好,我是PHP的新手,不太清楚你在问什么,但是如果你想在帖子中添加include文件:
function addstyling($content){
global $post;
$share = file_get_contents(TEMPLATEPATH . '/includes/share.php');
return $share . $content . '<br><br>Sharethis';
}
函数addStyleing($content){
全球$员额;
$share=file_get_contents(TEMPLATEPATH.'/includes/share.php');
返回$share.$content.“
共享此”;
}
Brilliantl为我的布局函数addStyleing($content){global$post;$share=file_get_contents(TEMPLATEPATH./includes/share.php');return$content.$share;}带来了我想要的文件,但当涉及到诸如a href的URL时,它破坏了内容,例:效果很好,但下面的中断有什么想法吗?
include(TEMPLATEPATH . '/includes/share.php');
function addstyling($content){
global $post;
$share = file_get_contents(TEMPLATEPATH . '/includes/share.php');
return $share . $content . '<br><br>Sharethis';
}