Tagged: social share link
-
AuthorPosts
-
September 24, 2014 at 10:35 am #324143
Hi there,
I have tried to use the following code on functions.php but the site goes to white screen after modifying the file.
add_action(‘ava_after_content’, ‘avia_add_social_toolbar’, 10, 2);
function avia_add_social_toolbar($id = “”, $context = “”)
{
if($context == “post”)
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;
}I have also tried to use shortcode [avia-sharelink] but that overlayed at the top of the page.
Appreciate your help.
September 24, 2014 at 1:23 pm #324221Hi shaon94!
Please try copy&pasting the code directly from here – http://pastebin.com/6XBwf5yg
Best regards,
YigitSeptember 24, 2014 at 3:10 pm #324311Hi Yigit,
Thanks for your response. I have copied the code from the link and pasted it in functions.php
still no luck. getting white screen after updating the file.
Thanks,
September 24, 2014 at 3:23 pm #324317Hi!
Do you mind creating a temporary admin login and posting it here privately?
Regards,
YigitSeptember 25, 2014 at 3:34 am #324747This reply has been marked as private.September 25, 2014 at 3:30 pm #325035September 26, 2014 at 3:50 am #325382This reply has been marked as private.September 26, 2014 at 10:16 am #325491Hi!
I fixed it by adding this code to the functions.php file:
add_action('ava_after_content', 'avia_add_social_toolbar_temp', 10, 2); function avia_add_social_toolbar_temp($id = "", $context = "") { if($context == "post") avia_social_share_links(); } add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder_temp', 10, 1); function avia_add_social_toolbar_template_builder_temp($content = "") { if(is_singular('post')){ $content .= avia_social_share_links(array(), false); $content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>'; } return $content; }
Cheers!
Peter -
AuthorPosts
- You must be logged in to reply to this topic.