简单画廊 Photos and images are a great way to reinforce messages, break up copy on your website, and help make it more engaging for your visitors. 照片和图像是增强信息,破坏网站上的副本并使其更加吸引访问者的一种好方法。 You’ve probably used the ‘Add Media’ function in WordPress to add images to your pages and posts. However, what if you’d like to display more than one photo in a grid of thumbnails? 您可能已经使用WordPress中的“添加媒体”功能将图像添加到页面和帖子中。 但是,如果您想在缩略图网格中显示多张照片怎么办? There are lots of plugins available that provide gallery functionality in WordPress, however, did you know that WordPress has it’s own default Gallery option available? 有很多可用的插件可在WordPress中提供画廊功能,但是,您是否知道WordPress有自己的默认画廊选项? In this quick tip, I’ll take you through the steps showing you how to add an image gallery in WordPress, with the added bonus of a lightbox popup so people can also easily browse through full size versions of your images. 在此快速提示中,我将引导您完成如何向您展示如何在WordPress中添加图片库以及灯箱弹出窗口的额外好处,以便人们还可以轻松浏览完整尺寸的图片。 1. Log into the WordPress dashboard. Open the page or post that you’d like to insert the gallery on. 1.登录WordPress仪表板。 打开您要插入图库的页面或帖子。 2. Place your cursor in the text editor where you’d like to insert the gallery and click ‘Add Media’. 2.将光标置于要插入图库的文本编辑器中,然后单击“添加媒体”。 3. Click on the ‘Create Gallery’ option on the left hand navigation. 3.点击左侧导航栏中的“创建图库”选项。 4. You can now choose to either ‘Upload Files’ to the Media Library or select images you have previously uploaded. Then select ‘Create Gallery’. 4.现在,您可以选择“上传文件”到媒体库或选择以前上传的图像。 然后选择“创建图库”。 5. You can easily reorder your images by clicking to drag and drop them into place. 5.您可以通过单击将其拖放到适当位置来轻松地对图像进行重新排序。 6. Next you can choose how you’d like to ‘link to’ the images. The option of ‘none’ means they won’t be clickable. Otherwise you can choose to link through to the ‘attachment page’ or ‘media file’. 6.接下来,您可以选择“链接到”图像的方式。 “无”选项意味着它们将不可点击。 否则,您可以选择链接到“附件页面”或“媒体文件”。 7. Select the ‘Columns’ drop down box and select the number of columns you’d like your images to be displayed across. 7.选择“列”下拉框,然后选择要在其上显示图像的列数。 8. Select the ‘Size’ drop down to specify the size of the images you’d like to use. 8.选择“尺寸”下拉列表以指定要使用的图像的尺寸。 9. Add a title, alt text for each photo. You can also choose to add a caption, which will be displayed beneath the image. 9.添加标题,为每张照片添加文字。 您还可以选择添加标题,该标题将显示在图像下方。 10. Your image gallery will then be inserted where your cursor was placed. To edit the gallery, click in the gallery area surrounding the photos and click on the edit (pencil) icon. To remove a gallery simply click on the ‘X’. 10.然后,您的图片库将被插入光标所在的位置。 要编辑图库,请在照片周围的图库区域中单击,然后单击编辑(铅笔)图标。 要删除图库,只需单击“ X”。 11. When you hit ‘save draft’ and ‘preview’ you should see an example like this: 11.当您单击“保存草稿”和“预览”时,您应该看到类似以下的示例: 11. To extend further upon the default WordPress gallery you can install a plugin such as Responsive Lightbox by dFactory so that when you click on a thumbnail, the image will be opened in a responsive slider. 11.要进一步扩展默认的WordPress画廊,您可以安装一个插件,例如dFactory的Responsive Lightbox,这样,当您单击缩略图时,图像将在响应滑块中打开。 So there you have it, a simple WordPress image gallery in 5 minutes. For more information on the WordPress Gallery, check out the WordPress Codex. 这样就可以在5分钟内找到一个简单的WordPress图片库。 有关WordPress画廊的更多信息,请查看WordPress Codex 。 If you have any WordPress gallery plugins you like to use or recommend, please be sure to share it in the comments below. 如果您有任何喜欢使用或推荐的WordPress画廊插件,请确保在下面的评论中分享。 翻译自: https://www.sitepoint.com/create-a-simple-wordpress-gallery/ 简单画廊 如何在WordPress媒体上传器中使用“创建库”功能 (How to Use the ‘Create Gallery’ Feature in the WordPress Media Uploader)
结论 (Conclusion)
最后
以上就是勤劳牛排最近收集整理的关于简单画廊_快速提示:5分钟内创建一个简单的WordPress画廊的全部内容,更多相关简单画廊_快速提示:5分钟内创建一个简单内容请搜索靠谱客的其他文章。
发表评论 取消回复