Tagged: social sharing
Hi Josue,
To make the social sharing buttons appear on portfolio posts I tried adding the following to my functions.php, but the social sharing bar appeared at the top of my page, clashing with the image and text, rather than underneath the content? I don’t understand why as on other websites I have used this without this problem. I’ve had to disable it on my live website as it was making the website unusable.
Thanks, Richard
add_filter(‘avf_template_builder_content’, ‘avia_add_social_toolbar_template_builder’, 10, 1);
function avia_add_social_toolbar_template_builder($content = “”)
{
if(is_singular(‘portfolio’)) {
$content .= avia_social_share_links(array(), false);
$content .= ‘<div style=”height:1px; margin-top:50px;” class=”hr”></div>’;
}
return $content;
}
Hi Richard!
You can remove the code and use new “Social Share Buttons” element under Content elements in Advanced Layout Builder :)
Best regards,
Yigit
Fantastic! thanks Yigit, great addition…