我想添加一个pinterest链接到我的WordPress的网站。这里的计算器,我发现下面的代码:在WordPress的Pinterest链接给出错误
<?php
/*Stuff for Pinterest*/
//getting the permalink
$postpermalink = urlencode(get_permalink());
//getting the thumbnail
$imageurl = urlencode(wp_get_attachment_url(get_post_thumbnail_id($post->ID)));
/*End of Pinterest*/
?>
<a target="blank" href="http://pinterest.com/pin/create/button/?url=<?php echo $postpermalink ?>&media=<?php echo $imageurl ?>" title="Pin This Post">pinterest</a>
但是当我测试了一下,Pinterest的给了我以下错误:
Whoops! Parameter 'method' (value link) is not one of unknown, uploaded, scraped, bookmarklet, email, iphone, button, ipad, android, android_tablet, api_sdk, extension, api_other, bad.
我已经试过吨等不同环节,但没有成功。有任何想法吗?
感谢您的帮助,但不幸的是,这也不起作用。 – Jando
更正了上述代码中的拼写错误,它在我的安装中工作正常。 – user3167160