Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.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
wordpress将文件管理器添加到内容中_Wordpress_Add Filter - Fatal编程技术网

wordpress将文件管理器添加到内容中

wordpress将文件管理器添加到内容中,wordpress,add-filter,Wordpress,Add Filter,我使用以下过滤器向帖子内容添加功能: function hook_shrinkshare( $content ){ if(is_single()) { $content.= get_social_share(); return $content; }} add_filter('the_content', 'hook_shrinkshare' ,'100'); 我想上述内容被添加到原来的帖子内容底部。出于某种原因,它将其添加到上面 有人能给我指出正确的方向吗?传递给函数的$

我使用以下过滤器向帖子内容添加功能:

function hook_shrinkshare( $content ){

if(is_single()) {

    $content.= get_social_share();
    return $content;
}}

add_filter('the_content', 'hook_shrinkshare' ,'100');
我想上述内容被添加到原来的帖子内容底部。出于某种原因,它将其添加到上面


有人能给我指出正确的方向吗?

传递给函数的
$content
是否为空? 试试这个:

add_filter('the_content', 'hook_shrinkshare' ,'100', 1);

这让过滤器知道函数只接受一个参数。

no$content不为空。我试过上面的方法。它仍然显示在内容上方。我不确定内容是什么。你认为原因可能在HTML或CSS中吗?内容是_content();对不起,我指的是
get\u social\u share()
的内容。这可能与您试图附加的内容的HTML和CSS有关。