如何在WordPress侧边栏小部件中显示最新的Pinterest引脚

Few days ago, we showed you how to add the Pinterest “Pin It” button in your WordPress blog. We are seeing more and more people joining Pinterest every day. Some of you might even want to show your latest pins in your sidebar. Well, in this article, we will show you an easy way to displaying your latest pinterest pins in your sidebar or any other dynamic widgets area.

几天前,我们向您展示了如何在WordPress博客中添加Pinterest“ Pin It”按钮 。 每天都有越来越多的人加入Pinterest 。 某些人甚至可能希望在边栏中显示最新的图钉。 好吧,在本文中,我们将向您展示在边栏或任何其他动态窗口小部件区域中显示最新pinterest引脚的简单方法。

First thing you need to do is install and activate the Pinterest RSS Widget plugin. After installation, simply go to Appearance » Widgets. There will be a widget called Pinterest RSS Widget. Drag it in the appropriate widget area, and configure the settings.

您需要做的第一件事是安装并激活Pinterest RSS Widget插件 。 安装后,只需转到外观»小部件。 将有一个名为Pinterest RSS Widget的小部件。 将其拖动到适当的窗口小部件区域,然后配置设置。

Pinterest RSS Widget for WordPress

You can customize the size of your thumbnails. You can also choose to display the titles below the images or not.

您可以自定义缩略图的大小。 您也可以选择是否在图像下方显示标题。

If you want to show the Pinterest Pins on a post or a page, then you can do that using the following shortcode:

如果要在帖子或页面上显示“ Pinterest固定图钉”,则可以使用以下短代码来实现:

[prw username=”syedbalkhi” maxfeeds=”10″ divname=”myList” printtext=”0″ target=”newwindow” useenclosures=”yes” thumbwidth=”100″ thumbheight=”100″ showfollow=”medium”]

[prw username =“ syedbalkhi” maxfeeds =“ 10” divname =“ myList” printtext =“ 0” target =“ newwindow” useenclosures =“ yes” thumbwidth =“ 100” thumbheight =“ 100” showfollow =“ medium”]

If you want to show the Pinterest Pins in your theme by hard coding it, you can also do that using this plugin. Simply add the following codes wherever you want to display the latest pins:

如果您想通过硬编码在主题中显示Pinterest引脚,则也可以使用此插件来实现。 只需在要显示最新引脚的位置添加以下代码:


<?php get_pins_feed_list($username, $maxfeeds, $divname, $printtext, $target, $useenclosures, $thumbwidth, $thumbheight, $showfollow); ?>

The parameters are:

参数为:

  • username is the Pinterest username you wish to display Pins from (mandatory)用户名是您希望从中显示图钉的Pinterest用户名(强制性)
  • maxfeeds is the maximum number of Pins to display (optional, default = 25)maxfeeds是要显示的最大引脚数(可选,默认= 25)
  • divname is a name suffix for the list class. “myList” will become “pins-feed-myList” (optional)divname是列表类的名称后缀。 “ myList”将变为“ pins-feed-myList”(可选)
  • printtext must be 1 if you want the first few words of the Pin description to be printed below the thumbnail (optional)printtext必须为1(可选)
  • target is “samewindow” or “newwindow”, depending on where you want links to open (optional, default = samewindow)目标是“ samewindow”还是“ newwindow”,具体取决于您要在何处打开链接(可选,默认= samewindow)
  • useenclosures is “yes” or “no” (optional, default = yes). Use this if you don’t want to use the tag in the feed and force the script to find an image useenclosures是“是”或“否”(可选,默认=是)。 如果您不想在Feed中使用标签并强制脚本查找图片,请使用此标签
  • link in the feed item description.

    Feed项目说明中的链接。
  • thumbwidth is a number that will set the width in pixels of the Pin’s thumbnail (optional, default = 150)
  • thumbwidth是一个数字,它将设置图钉缩略图的宽度(以像素为单位)(可选,默认为150)
  • thumbheight is a number that will set the height in pixels of the Pin’s thumbnail (optional, default = 150)
  • thumbheight是一个数字,它将设置图钉缩略图的高度(以像素为单位)(可选,默认为150)
  • showfollow is “large”, “medium”, “small”, “tiny” or “none” (optional, default = none). Use this if you want to show the “Follow Me On Pinterest” button below the thumbnails. Select the size that best fits the space allowed (“large” is 156×26, “medium” is 78×26, “small” is the square 61×61 logo, and “tiny” is the 16×16 logo.)showfollow是“大”,“中”,“小”,“小”或“无”(可选,默认为无)。 如果要在缩略图下方显示“在Pinterest上关注我”按钮,请使用此按钮。 选择最适合所允许空间的尺寸(“大”为156×26,“中”为78×26,“小”为61×61方形徽标,“小”为16×16徽标。)

When installing this plugin, we ran into the issue of images not showing up. Thankfully, it is a known issue and the author has already covered it into the FAQ’s section of the plugin. If your images are not showing up, then below are the possible solutions:

安装此插件时,我们遇到了无法显示图片的问题。 值得庆幸的是,这是一个已知问题,作者已经在插件的FAQ部分中进行了介绍。 如果未显示图像,则可能的解决方法如下:

  • TimThumb requires the GD library, which is available on any host sever with PHP 4.3+ installed. Make sure your host has this installed (most do).

    TimThumb需要GD库,该库可在安装了PHP 4.3+的任何主机服务器上使用。 确保您的主机已安装了此主机(大多数安装)。
  • Once installed and in-use, TimThumb will automatically create a /prw_tmp/ subfolder in your/ wp-content/uploads/ directory with proper write-permissions. If your host server doesn’t allow this by default, be sure to manually create the /prw_tmp/ subfolder in your/ wp-content/uploads/ directory and set the /prw_tmp/ folder permissions to 755. If this still doesn’t work, try setting the /cache/ folder permissions to 777.

    安装并使用后,TimThumb将在您的/ wp-content / uploads /目录中以适当的写许可权自动创建/ prw_tmp /子文件夹。 如果默认情况下您的主机服务器不允许此操作,请确保在您的/ wp-content / uploads /目录中手动创建/ prw_tmp /子文件夹,并将/ prw_tmp /文件夹权限设置为755。 ,请尝试将/ cache /文件夹权限设置为777。
  • Known issue with timthumb.php on Hostgator: If your website is hosted on Hostgator, you may need to contact HostGator to request “mod_security whitelisting”. More info here: http://support.hostgator.com/articles/specialized-help/technical/timthumb-basics
  • Hostgator上的timthumb.php的已知问题:如果您的网站托管在Hostgator上,则可能需要与HostGator联系以请求“ mod_security白名单”。 此处的更多信息: http : //support.hostgator.com/articles/specialized-help/technical/timthumb-basics

Download Pinterest RSS Widget plugin

下载Pinterest RSS Widget插件

P.S. Don’t forget to follow Syed on Pinterest

PS不要忘了在Pinterest关注Syed

翻译自: https://www.wpbeginner.com/plugins/how-to-show-your-latest-pinterest-pins-in-wordpress-sidebar-widgets/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值