I’ve had a plugin created that allows me to add custom type posts to the site, they are not posts or pages but I would like to know how I can get the side social buttons to appear on these as they to in normal posts. Is this possible?
Thanks
Hi!
Can you post a link to one of your posts where this side links appear?
Cheers!
Josue
Hi Josue,
I have created a test one here: http://executivecontracts.co.uk/test-news-post/
the sharing buttons are at the bottom. would it be possible to have them on these custom posts?
http://executivecontracts.co.uk/offer/porsche-cayenne/
Thanks
Dom
Hey Dom!
Try adding this at the very end of your theme / child theme functions.php file:
add_filter('the_content', 'add_social_links', 20);
function add_social_links($content){
if(is_singular('offer')){
$content .= avia_social_share_links(array(), false);
}
return $content;
}
Cheers!
Josue
Hi Josue,
Thanks for the info, I have tried on both normal theme and child theme and neither of them seem to work. any ideas?
Hi!
Are you using a custom template for your “offer” single view (single-offer.php)? if that’s the case you’d need to directly add this line somewhere in that file:
avia_social_share_links();
Best regards,
Josue