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有关。