Tagged: social sharing
-
AuthorPosts
-
March 19, 2015 at 1:13 pm #414343
Hi support team,
i modified the function.php with the following code. After the latest update the social icons disappeared on my website. On top of the page now there is written: “Teile diesen Eintrag:”
I deactivated that code temporarily. Do you have any idea what goes wrong?
Thanks dondela//show social sharing in avia
add_action(‘ava_after_content’, ‘avia_add_social_toolbar’, 10, 2);
function avia_add_social_toolbar($id = “”, $context = “”)
{
if($context == “page” || $context == “single-portfolio”)
avia_social_share_links();
}add_filter(‘avf_template_builder_content’, ‘avia_add_social_toolbar_template_builder’, 10, 1);
function avia_add_social_toolbar_template_builder($content = “”)
{
$content .= avia_social_share_links(array(), false);
$content .= ‘<div style=”height:1px; margin-top:50px;” class=”hr”></div>’;
return $content;
}March 19, 2015 at 2:12 pm #414378Hi dondela!
You no longer need to use a code to display share buttons. Please edit your page and add Social Share Buttons element under Content elements in Advanced Layout Builder
Regards,
YigitMarch 19, 2015 at 9:15 pm #414843Hi Yigit,
thanks for your fast answer. So there is no way to show this social share buttons globally on all pages?
I am asking because i would have to change 50 pages…
Thanks dondelaMarch 21, 2015 at 5:48 am #415640Hi!
Please replace the code with this:
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { $content .= avia_social_share_links(array(), false, '', false); $content .= ''; return $content; }
Best regards,
IsmaelMarch 21, 2015 at 2:15 pm #415727Thanks for helping,
tried this code but nothing changed. I still see no social sharing buttons.
Is this the right code?//show social sharing in avia
add_action(‘ava_after_content’, ‘avia_add_social_toolbar’, 10, 2);
function avia_add_social_toolbar($id = “”, $context = “”)
{
if($context == “page” || $context == “single-portfolio”)
avia_social_share_links();
}function avia_add_social_toolbar_template_builder($content = “”)
{
$content .= avia_social_share_links(array(), false, ”, false);
$content .= ”;
return $content;
}
}March 22, 2015 at 4:27 pm #415980Hey!
The code works fine our installation. Post the website url here, we would like to check it. Note that this will only work for pages or posts created using the advance layout builder.
Regards,
IsmaelMarch 23, 2015 at 2:22 pm #416371I figured it out, it works now. I just had a typo-error.
Thanks for your great support! -
AuthorPosts
- The topic ‘show social sharing in avia code broken after enfold update 3.1.1’ is closed to new replies.