wordpress添加媒体_如何在WordPress中添加Flickr小部件

wordpress添加媒体

Flickr is one of the good old reliable photosharing sites. It has its very own social features and a thriving community of loyal users. Showcasing your flickr photos on your WordPress website is extremely easy. Since flickr supports oEmbed format, you can simply copy and paste a flickr photo URL in a WordPress post, and WordPress will automatically display the photo on that page. Recently one of ours asked us how do you add a showcase of your recent flickr photos in a WordPress sidebar widget? In this article we will show you how to add a flickr widget in WordPress.

Flickr是可靠的旧照片共享站点之一。 它具有自己的社交功能和忠实用户的繁荣社区。 在WordPress网站上展示flickr照片非常容易。 由于flickr支持oEmbed格式,因此您只需在WordPress帖子中复制并粘贴flickr照片URL,WordPress就会自动在该页面上显示照片。 最近,我们中的一个问我们如何在WordPress侧边栏小部件中添加最近的flickr照片展示柜? 在本文中,我们将向您展示如何在WordPress中添加flickr小部件。

First thing you need to do is install and activate the Quick Flickr Widget. Once activated, go to Appearance » Widgets section in your WordPress admin. There you will see a new widget called Quick Flickr Widget. Drag and Drop the Quick Flickr Widget to one of the sidebars also known as widget areas. In the widget configuration, simply add your Widget title, your flickr username, the count of images you want to show, and a flickr tag if any specific ones you want to pull from.

您需要做的第一件事是安装并激活Quick Flickr Widget 。 激活后,转到WordPress管理员中的外观»小部件部分。 在那里,您将看到一个名为Quick Flickr Widget的新部件。 将Quick Flickr窗口小部件拖放到侧栏之一,也称为窗口小部件区域。 在窗口小部件配置中,只需添加窗口小部件标题,您的flickr用户名,要显示的图像数以及一个flickr标签(如果要从中提取特定图像)即可。

Quick Flickr Widget

Once you hit save, you will see your flickr photos being displayed in the sidebar.

点击保存后,您将在侧边栏中看到您的flickr照片。

Quick Flickr Widget Display

If you notice in the screenshot above, we have two different displays. The one to the left is how the default widget would look like. The default display is built to show one wide image thumbnail per line. If you want to show more than one flickr image per line in a grid format like we have done in the right screenshot, then you would need to add a custom CSS class in your theme’s style.css file.

如果您在上面的屏幕截图中注意到,我们有两种不同的显示方式。 左侧的是默认小部件的外观。 默认显示被构建为每行显示一个宽图像缩略图。 如果要像我们在右侧屏幕截图中所做的那样,以网格格式每行显示多个flickr图像,则需要在主题的style.css文件中添加一个自定义CSS类。


.quick-flickr-item {
width: 150px;
float: left;
margin: 0 20px 20px 0;
}

You would probably need to adjust the width and margin above to match your theme’s layout. For example, if you have a smaller sidebar, then you would make the width smaller, and adjust the margins until it looks right. It will take a little bit of trial and error.

您可能需要调整上面的宽度和边距以匹配主题的布局。 例如,如果边栏较小,则可以将宽度减小,并调整边距,直到看起来正确为止。 这将需要一些反复试验。

There are several other plugins that will allow you to add flickr widgets in WordPress sidebar and widget areas. We chose Quick Flickr Widget because it is created by a well-reputed author, and has fairly good ratings. It is also very light-weight and well-coded, so it will NOT slow down your site. Last but certainly not the least, it is very easy to setup.

还有其他几个插件,可让您在WordPress侧边栏和小部件区域中添加flickr小部件。 我们选择Quick Flickr Widget,因为它是由一位声誉卓著的作者创建的,并且具有相当好的评级。 它的重量也很轻且编码良好,因此不会降低您的网站速度。 最后但并非最不重要的一点是,它很容易设置。

There are other more advanced flickr plugins such as Slickr Flickr which adds ton of extra functionality that you may or may not need. For example: display flickr photos as a gallery, or a slideshow. It also adds lightbox display for flickr photos with captions, and much more. However it is not as easy to setup as Quick Flickr Widget, and it will have a slight impact on your site’s performance.

还有其他更高级的flickr插件,例如Slickr Flickr ,它增加了您可能需要或可能不需要的大量额外功能。 例如:将flickr照片显示为图库或幻灯片。 它还为带有字幕的flickr照片添加了灯箱显示,等等。 但是,它不像Quick Flickr Widget那样容易设置,并且会对您网站的性能产生轻微影响。

We hope that this article helped you quickly add a flickr widget in WordPress sidebar and widget areas. Are you using a plugin to display flickr widget in WordPress? Which one is it? Let us know by leaving a comment below.

我们希望本文能帮助您在WordPress侧边栏和小部件区域中快速添加flickr小部件。 您是否正在使用插件在WordPress中显示flickr小部件? 哪一个? 让我们在下面留下评论。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-a-flickr-widget-in-wordpress/

wordpress添加媒体

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值