Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #317420
    #317778

    Hey Andrew!

    This could work, try adding this to functions.php:

    function avia_sharelinks_func() {
    	avia_social_share_links();
    }
    add_shortcode('avia_sharelinks', 'avia_sharelinks_func');
    

    Then wherever you want the share links to appear use [avia_sharelinks].

    Cheers!
    Josue

    #318022

    Thanks for getting back to me Josue, I will give it a go!

    Thanks again,

    Andrew

    #318126

    Hi!

    Please try and let us know so we can mark the thread as resolved or assist you further :)

    Best regards,
    Yigit

    #318480

    Hello,

    Unfortunately this didn’t have any effect. I added the code to the bottom of the functions.php file and added the shortcode in a text box on a page but nothing appears on the page where the sharebox should be.

    Thanks

    Andrew

    #318483

    My mistake, it does appear but not where it should. The page has a slider at the top and the share box text appears above it (under the title bar) but the actual share boxes are under the slider, I can only just slightly see the first couple of pixels of them. This happens no matter where I place the text box on the page.

    Thanks

    Andrew

    #318531

    Hi!

    Unfortunately, using the function as a shortcode will break the layout of the share section. You can add this on functions.php:

    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(2) || is_page(1167)) {
    	$content .= avia_social_share_links(array(), false);
    	$content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>';
    	}
    	return $content;
    }
    
    

    Change the page id on the is_page function to control where you want to show the share section.

    Regards,
    Ismael

    #318544

    Hello and thanks for the reply.

    Not really an option to use page id’s because this might need to apply to hundreds of pages as and when. Can I suggest that something as crucial as a social share option should really be part of the layout builder or shortcode generator in future, I was surprised that it is not already in there.

    Thanks

    Andrew

    #318558

    Hey Andrew!

    Please request it here as a new feature.

    Best regards, 
    Josue

    #318635

    Will do,

    Thanks again,

    Andrew

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Social Share Box On Pages’ is closed to new replies.