Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #515729
    #516192

    Hi Simon!

    Thank you for using Enfold.

    Did you use the advance layout builder to add the social section? Or did you add it in a template file? If you check the html markup, it is currently rendered at the very top of the content. Please post the login details here so that we can check the site.

    Regards,
    Ismael

    #516194

    Hi Ismael,

    There are only custom additions in the child theme’s functions.php file.

    thanks,

    Simon

    :-

    //Sharing buttons
    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;
    }
    function modify_share_title(){
    return “Tell your friends”;
    }
    add_filter(‘avia_social_share_title’, ‘modify_share_title’);

    add_theme_support(‘avia_template_builder_custom_css’);
    ?>

    #516411

    Hey!

    Instead of using code, you can use Social Share Buttons element under Content elements to add social sharing to your content

    Cheers!
    Yigit

    #518042

    The new alb element for social sharing is really fine, but what if you want to add social sharing to a large number of portfolio items you’ve already made ?
    In that case, the code given here to put in functions.php is very useful : https://kriesi.at/support/topic/share-icons-on-pages-and-portfolio-items/
    So, i would love using it on a site, but i can’t find the css to push the social bar at the bottom of the portfolio items.

    http://venise-alacarte.fr/portfolio-item/arte-couple-4-personnes/

    Could you help me please ?

    #518603

    Hey!

    try this code:

    .av-share-box {
    position: relative; 
    top: 835px;
    }
    

    Cheers!
    Andy

    #518632

    Thanks Andy, but it does not seem to work. My question was : how to put the sharebox after the alb content , regardless of this content’s height (i.e. for all portfolio items).

    #521430

    Hi!

    Please remove the previous modifications then replace the code on functions.php with this:

    //social filter in the template builder
    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')) {
    		ob_start();
    		avia_social_share_links(array(), false);
    		$social = ob_get_clean();
    		$content = $content . $social;
    	}
    	
    	return $content;
    }

    Regards,
    Ismael

    #521501

    Thanks for your help Ismael.
    That filter must replace all the old code in function.php of the child theme, i’ve got it right ?

    Doing that, i’ve got that php error :
    ” Parse error: syntax error, unexpected T_FUNCTION, expecting T_STRING or T_VARIABLE or ‘$’ in /homepages/15/d311963126/htdocs/New/wp-content/themes/enfold-venisealc/functions.php on line 31 ”

    Any idea why ? Thanks.

    #522119

    Hi,

    That means you have an error in your code, could you send us an admin login so that we can have a closer look? You can post the details in the Private Content section of your reply.

    Regards,
    Rikard

    #522959

    Ok, i tried again and it seems ok. I’ve probably done something wrond adding the php in functions.php.

    Is it possible to do the same thing with pages ?

    Thanks for your kind help.

    #523022

    Hey!

    try this code for pages:

    //social filter in the template builder
    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
    	if(is_page()) {
    		ob_start();
    		avia_social_share_links(array(), false);
    		$social = ob_get_clean();
    		$content = $content . $social;
    	}
    	
    	return $content;
    }
    

    Best regards,
    Andy

    #523034

    Thanks Andy.
    Close Thread for me.

    #523058

    glad we could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.

    Cheers!
    Andy

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Social links position moved after update’ is closed to new replies.