Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #356053

    Good day to you guys,

    How do I get the social share icons (end of post content) also on regular pages ?

    Cheers
    Rhoody

    #356236

    Hi Rhoody!

    Thank you for using Enfold.

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

    The code will add the social share section on all pages created with the advance layout builder.

    Best regards,
    Ismael

    #356391

    Thank you Ismael.
    that work like charm for pages with layout builder. How do I get it on “normal” pages too?
    cheers
    Rhoody

    #356587

    Hi!

    You can edit page.php, find this code:

    $avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
                        get_template_part( 'includes/loop', 'page' );
    

    Below, add the avia social function:

    $content .= '<div style="height:1px; margin-top:20px;" class="hr"></div>';
    	$content .= avia_social_share_links(array(), false);
    

    Regards,
    Ismael

    #357222

    Once again, awesome job, Ismael :-)
    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Share Icons on Pages’ is closed to new replies.