Mattias Hemmingsson
Mattias Hemmingsson

Reputation: 1

Like url from Wordpress incorrect

I'm helping out as admin on a WordPress site and we are adding the ability to "Like" individual post and pages and are using the following code;

<div class="fb-like" data-href=”<?php the_permalink(); ?>” data-send="false" data-width="450" data-show-faces="true"></div>

The Like button displays correctly but the url for some reason has an " added in the end rendering the link to become invalid. If I "echo" the result of the_permalink it displays the correct url.

Example; Like is clicked on http://my.blog/is-cool/ but the displayed url on my timeline is http://my.blog/is-cool/".

Upvotes: 0

Views: 113

Answers (1)

McNab
McNab

Reputation: 6777

Your double quote marks around the <?php the_permalink(); ?> are incorrect - they are the 'curly quotes'.

Upvotes: 1

Related Questions