Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #311973
    #311974
    This reply has been marked as private.
    #312120

    Hey!

    Thank you for using Enfold.

    Note that we don’t usually provide support for those who want to use the ALB for posts because of issues such as this one. If you want the share section entry below the post content, you can use this:

    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
    	if(is_single()) {
    	$content .= '<div class="container">';
    	$content .= avia_social_share_links(array(), false);
    	$content .= '</div>';
    	$content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>';
    	}
    	return $content;
    }

    Cheers!
    Ismael

    #312197

    Hey Ismael,

    I understand and really appreciate your help. Can you please let me know where to add this code?

    Thank you,

    Best,

    Cerasela

    #312200

    Hey!

    Please go to Appearance > Editor and add the code to functions.php file

    Regards,
    Yigit

    #312312

    Hey Yigit,

    It worked, thank you!

    Just a minor tweak: would it be possible to have this section compacted and aligned to the left so that it does not go through the sidebar?
    (currently it stretches on all the page including the sidebar: http://enter-law.com/rca/)

    Also this code appears before the share section of each post for some reason:

    [/av_four_fifth]

    How can I remove it?

    Thank you and regards,

    Cerasela

    #312991

    Hi!

    1) The [/av_four_fifth] code must be part of your (customized) code. If you’re not sure which function or template outputs this code please upload an unmodified version of the theme and customize the code step by step to find the culprit.

    2) You could add a style attribute to the container like:

    
    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
    	if(is_single()) {
    	$content .= '<div class="container" style="max-width: 500px;">';
    	$content .= avia_social_share_links(array(), false);
    	$content .= '</div>';
    	$content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>';
    	}
    	return $content;
    }
    

    You can replace 500px with any other positive px value if you want to change the width of the social icons box.

    Cheers!
    Peter

    #313119

    Thank you Peter,

    For 2) I have tried with 400px and it looks better but it is still kind of in the middle of the page, I have even tried with my limited knowledge to add align:left; at the end of this line
    $content .= ‘<div style=”height:1px; margin-top:50px;” class=”hr”></div>’;
    but it wasn’t taken into account.

    Would you be kind enough to give me an equivalent for align:left that would work with this code you provided so that the whole section (including “Share this entry”) is aligned with the rest of the post?

    (Regarding point 1) I think it appears because of an incompatibility between this code for the share section and the ALB, I have noticed that usually ALB gave this type of errors when it was not confortable with the section before or after the error code, but as I can’t even imagine to alter/adapt this code myself I will wait until someone more experienced will be able to give me a hand. I understand if you can’t look into it further at this stage.)

    Thanks again and have a nice day/evening,
    Best,

    Cerasela

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Social sharing and printer friendly icons at the end of posts using ALB’ is closed to new replies.