Hope your well,
I need some help regarding how to create custom share buttons. It seems webflow use this a lot but do not have a tutorial. Also it seems to be a very popular question on the forum but it has never been answered. I have read though all the blogs but I have had no joy.
I would really appreciate some help
Maybe this topic is relevant?
Hello, my dear friends and colleges!
Since this question pops up periodically, I decided to put all information together in one post.
For creating sharing buttons/links on dynamic templates, we will use the awesome method described by @Waldo ( FREEBIE: Sharing is Caring :) ) and a little bit custom code.
Follow @Waldo’s method and create needed buttons in Webflow. Give it classes, style it as you want, use the background image (icon) or words, whatever you need to get …
Thanks for replying Webdev.
Yes I have tried this but have had no joy. This still didn’t work unfortunately.
I am waiting to publish a design and it cannot be until it is done. Very annoying.
If no one can help with this do you know what options I have regarding getting this sorted?
Can you please describe the issue in greater detail? I am not clear what issue you are experiencing since I don’t know the end result you want nor can I access the project for review.
Sure no worries.
I need to have the logos be able to share on the social media networks that correspond with the the logos.
So the viewer to the site clicks on facebook --------- It shares on facebook
So the viewer to the site clicks on Twitter --------- It shares on Twitter
It shares on facebook
Please define what IT is? A page? A collection item?
It is a CMS page.
I have been trying myself but still have had no luck with this.
I am not sure where you are having an issue. For further help you would need to share your Read-Only project link and page where the implementation does not work for you.
If you look at the demo code provided In the topic I shared, you need to place a element between the anchor tag (something to click). So that would need to exist in the HTML embed.
<a class="w-inline-block social-share-btn fb" href="https://www.facebook.com/sharer/sharer.php?u=&t=" title="Share on Facebook" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;">
Your linked image element goes here. An SVG for example.
What part is not working for you?