【发布时间】:2013-12-03 22:21:21
【问题描述】:
是否可以在自定义 Pinterest 按钮的媒体参数中包含多个图像?
例如,我知道应该包含一张特定的图片:
<?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>
<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="vertical">Pin It</a>
但假设我有一个自定义帖子类型的图片轮播。我希望能够将每个图像固定在轮播中。我已经查询了轮播的图像,所以这只是将它们正确编码到 url 中的语法问题。这不起作用:
<a href="http://pinterest.com/../../?url=<?php echo urlenco../&
media=<?php echo $largeImages; ?>&../../>Pin It</a>
其中 $largeImages 是对帖子中所有附件的查询。
【问题讨论】:
标签: wordpress button pinterest