Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #585813

    I’ve seen and used the code from other posts regarding showing Share icons on the portfolio pages. My problem relates to where they are shown. I added the following to my child themes functions file and it works, but places them at the top of the page. I’d like them to be at the bottom. How can I affect this change?

    add_action('ava_after_content', 'avia_add_social_toolbar', 10, 2);
    function avia_add_social_toolbar($id = "", $context = "")
    {
    	if($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;
    }
    #585814

    I Just realized its also showing on pages as well as the portfolio items…

    #586829

    Hi!

    Thank you for using Enfold.

    Are you using the advance layout builder to create the content of the portfolio items? If yes, use this code in place of the ones above:

    add_filter('avf_template_builder_content', 'avf_template_builder_content_social_mod', 10, 1);
    function avf_template_builder_content_social_mod($content = "")
    {
    	if(is_singular('portfolio')) {
    		ob_start();
    		avia_social_share_links(array(), false);
    		$social = ob_get_clean();
    		$content = $content . $social;
    	}
    
    	return $content;
    }
    

    Best regards,
    Ismael

    #587414

    Solved. Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show Share Icons on portfolio items [placement issue]’ is closed to new replies.