Tagged: share icons
Good day to you guys,
How do I get the social share icons (end of post content) also on regular pages ?
Cheers
Rhoody
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
Thank you Ismael.
that work like charm for pages with layout builder. How do I get it on “normal” pages too?
cheers
Rhoody
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
Once again, awesome job, Ismael :-)
Thanks