Show social sharing button on latest posts front page
-
Admin
Not really, no. Most of the social sharing button codes take the URL of the current page to be shared. Putting the social sharing button on the front page will make all of the buttons for all the posts to be sharing the same url – the front page url.
The button code I’m using takes that into account. It starts with the following:
‘<div class=”addthis_toolbox addthis_default_style” addthis:url=”<?php echo get_permalink(); ?>” addthis:title=”<?php echo get_the_title($postid); ?>”>’
It would be very helpful if the buttons could show on the front page.
Either way, thanks for all of your work. The theme is beautiful!
Admin
You can’t use that button code with the social sharing button options in the theme, cause it contains PHP which would not be parsed. You would have to include it via a child theme
functions.phpfile instead.Admin
Update: in the next version I’ll include two tags (
[#post-url]and[#post-title]) which you can use in the social sharing code. The theme will then replace these tags with the post’s URL and title.
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
