Hi!
I am using the following function to place addthis share buttons after the content of each post:
function diww_add_post_content($content) {
if (is_single()) {
$content .= '<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a></div>';
}
return $content;
}
add_filter ('the_content', 'diww_add_post_content', 0);
It's working fine, but I also want to add a button for sharing on the site FANCY.com which mixes PHP and HTML and I can't figure out how to "open" and "close" each PHP snippet. Here is the FANCY button code:
<a id="FancyButton" href="http://www.thefancy.com/fancyit?ItemURL=<?php the_permalink(); ?>&Title=<?php echo get_the_title(); ?>&Category=Men's&ImageURL=<?php if(function_exists('the_post_thumbnail')) echo wp_get_attachment_url(get_post_thumbnail_id()); ?>">Fancy</a>
I don't know PHP...can someone please help me properly open and close this to work inside the function above?
Thanks!