-
AuthorPosts
-
September 11, 2013 at 12:24 pm #29432
Hi there,
I´d like to create a list of static share Icons for Twitter, FB and G+ below my blog posts. I could use small icons but I prefer to use the iconfont that is used by Enfold anyway to generate the icons.
How can I make use of the icon font? This is my example code
<a class="avia-font-entypo-fontello social_bookmarks_twitter" title="Bei Twitter empfehlen" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo rawurlencode(strip_tags(get_the_title())) ?>%20<?php echo wp_get_shortlink(); ?>" target="blank"> </a>
<a class="avia-font-entypo-fontello social_bookmarks_facebook" title="Auf Facebook teilen" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink($post->ID)); ?>&t=<?php echo rawurlencode(strip_tags(get_the_title())) ?>" target="blank"> </a>
<a class="avia-font-entypo-fontello social_bookmarks_gplus" title="Auf Google+ teilen" href="https://plusone.google.com/_/+1/confirm?hl=de&url=<?php echo urlencode(get_permalink($post->ID)); ?>&title=<?php echo rawurlencode(strip_tags(get_the_title())) ?>" target="blank"> </a>September 12, 2013 at 11:14 pm #140640Hi,
You could use the HTML code (ex: ✒) for each icon, here’s the Entypo character map.
Regards,
Josue
September 13, 2013 at 8:27 am #140641Thanks Josue. But it doesn´t seem to work.
<a class="socialshareing_twitter" title="Bei Twitter empfehlen" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo rawurlencode(strip_tags(get_the_title())) ?>%20<?php echo wp_get_shortlink(); ?>" target="blank"> Twitter</a>
I tried it for Twitter (example) and it delivers a “broken” icon
See screenshot https://dl.dropbox.com/s/dgnj867n4km4ltl/index.html
Other ideas anyone?
September 13, 2013 at 8:28 am #140642The embeded code destroyed the Character I used for the Twitter icon. It is of course
September 13, 2013 at 8:28 am #140643Urgh…destroyed again
& #62217; (without space)
And sorry I didn´t realize I could edit my entry without posting and posting ;-)
September 13, 2013 at 8:35 am #140644Me again.
It works. I forgot to add the CSS class .avia-font-entypo-fontello.
Awesome!
September 13, 2013 at 2:09 pm #140645Hi Michael,
Glad you get it working :)
Regards,
Josue
-
AuthorPosts
- The topic ‘Using the Fonttype Social Media Icons in single Posts’ is closed to new replies.