Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #612540

    Hello,

    I use your code:

    add_theme_support( 'avia_custom_shop_page' );
    
    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;
    }
    
    add_action('woocommerce_after_single_product_summary', 'avia_add_social_toolbar', 10);
    function avia_add_social_toolbar()
    {
    	$content  = avia_social_share_links(array(), false, '', false);
    	$content .= '<div class="hr"></div>';
    	
    	echo $content;	    
    }
    

    1. I would like to visible social share links on product page only. Now the links are visible on front page too.
    2. And how can I change width and position of social share links? Please check my mockup. Can I use a simple selector?

    Best regards,
    Peter

    #614571

    Hey Peter!

    Thank you for using Enfold.

    Please replace the code with the following:

    add_theme_support( 'avia_custom_shop_page' );
    
    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( 'product' ) ) {
    	     $content .= avia_social_share_links(array(), false, '', false);
    	     $content .= '';
            }
    	return $content;
    }
    
    add_action('woocommerce_after_single_product_summary', 'avia_add_social_toolbar', 10);
    function avia_add_social_toolbar()
    {
            if( is_singular( 'product' ) ) {
    	     $content  = avia_social_share_links(array(), false, '', false);
    	    $content .= '<div class="hr"></div>';
    	}
    	echo $content;	    
    }

    Regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.