With WordPress, you can easilyadd an image to your blog posts or pages. But let’s say you want to add a half dozen images.

As you upload images one after another, they’ll either stack on top of each other or fit into unevenly separated rows.

Screenshot of images stacked without using WordPress gallery

在不平坦的行中的图像而不创建WordPress画廊

除了难看的美学外,这些布局还需要您的用户进行大量滚动以查看所有照片。它还将埋葬您在页面上包含的任何副本。

使用HubSpot的WordPress网站来发展业务

To avoid this, you can create a gallery to display images in a grid layout or as缩略图为您的用户提供更好的体验。您不仅可以在更少的空间中显示更多照片,而且还可以使用户更容易浏览它们。

最好的部分?您可以在短短几分钟内设置画廊。让我们浏览两种不同的方式,可以在WordPress中创建图像库。

How to Make a Photo Gallery in WordPress without a Plugin

您可以使用WordPress的内置画廊将眼睛糖果添加到您的网站上,仅几步之遥。这是您需要做的:

  • First, log into your WordPress dashboard.
  • 在页面的左侧,单击帖子页面.
  • Select添新或悬停在现有帖子或页面上,然后选择Edit.
  • 如果编辑帖子或页面,请将光标放置在您希望使用画廊的地方,如下所示。

如何在WordPress帖子中选择图片库的位置

  • 点击添加媒体button below the title.
  • Click创建画廊在页面的左侧。
  • 上传图像,或从媒体库中选择它们,如下所示。

如何选择媒体库的照片照片吗gallery in WordPress post

  • 点击Create a new gallery右下角的按钮。
  • You can edit your gallery in the following ways:
    • 点击相反的顺序按钮或拖动图像重新排序。
    • 将标题,字幕,描述和ALT文本添加到每个图像中。
    • 选择要显示的画廊的数量。
    • 将照片链接到附件页面(您的博客中的专门页面,显示您所选主题中的图像),媒体文件(直接链接到全尺寸上传的图像)或无。
    • 更改图像的大小。
Editing photo gallery in WordPress post
  • 点击Insert gallerybutton when you’re done.
  • 保存并预览草稿。
  • To make any changes, click on the gallery. Then, click the pencil icon as shown below.

How to update photo gallery in WordPress post

  • Once you’re done, click发布并陶醉于您的手工作品。

WordPress中已发布的照片​​库的示例

Short and sweet, right? The gallery layout is much cleaner than if you just upload your pictures one after another.

但是,经过上述步骤后,您可能会遇到一些限制。例如,如果您将画廊链接到媒体文件或附件页面,并且用户单击它,则将重定向,并且必须单击“返回”按钮以返回您的网站。

Because these galleries are not responsive, they won’t look the same on mobile and tablets. You also can’t tag the images or organize your galleries by topic or album. Since your galleries aren’t stored anywhere, if you wanted to add the same gallery to a different post, you’d have to build it from scratch.

For a more robust gallery that meets all your needs, you’ll use a plugin.

如何使用插件在WordPress中制作照片库

There are thousands of plugins available to set up and optimize a gallery in WordPress. When selecting one, you’ll want to check the plugin speed, ease of access, plugin ratings, and additional features. Let’s look at a few of the most popular plugins that meet the highest standard for these criteria.

Envira画廊

With the Envira Gallery plugin, you can create fully responsive galleries that work on mobile, tablet, and desktop devices — and not just image galleries. You can embed YouTube, Vimeo, and Wistia videos and import photos from Instagram and Dropbox to create high-quality multimedia galleries.

Envira Gallery提供了各种预制模板,以自定义画廊的外观以及CSS附加组件以创建完全自定义的模板。它还提供了一个拖放构建器,可用于更快的上传和快捷代码,以便于发布。

您还可以添加共享按钮,以使您的用户可以轻松地在Facebook,Twitter和Pinterest上共享您的画廊,或者通过插件的WooCommerce集成购买。您可以通过将图像和密码添加到画廊中的图像和密码来控制访问。

最后,通过深层链接和分页添加ONS,您可以为画廊中的每个项目创建独特的索引URL,并将画廊分配到多个页面上,以改善负载时间和用户体验。结果,这个SEO友好的插件可以帮助提高网站上的转换率。

wordpress中的Envira Gallery仪表板

资源

画廊

画廊by Angie Makes is a simple plugin that extends the built-in functionality of WordPress galleries. Rather than adding menu items to the WordPress dashboard, this plugin will expand the gallery settings in the edit module, offering custom size, caption, link, and display options.

There is a range of possible display styles, including a three-, five- and six-column mosaic, masonry, slider, and carousel style, all of which provide unique ways to hide or display captions. For example, in the six-column mosaic layout, you can hide the caption so that it only appears when a user hovers over a thumbnail. You also have the option to make the images into perfect squares as seen below.

Six-column mosaic layout available via Galleries plugin

资源

NextGen Gallery

NextGen Gallery is a robust WordPress plugin that provides multiple options to upload, edit, preview, and publish your photographs. If you’re worried about having too many choices, it has a built-in gallery wizard to guide you every step of the way.

You can add a NextGen gallery with the click of a button in the visual editor as shown below, which will pull up its intuitiveInsert Gallerywindow.

Next Gen的插入画廊窗口中的WordPress

资源

There, you can choose from over 10 display options, each of which comes with an array of options for controlling the size, style, timing, transitions, controls, lightbox effects, and more of your galleries.

NextGen也为您的用户提供了一些自治权,使他们可以选择如何查看您的画廊。例如,如果您选择将画廊显示为缩略图,NextGen将自动显示链接以显示您的画廊作为幻灯片。如果您选择将画廊显示为幻灯片,它将自动显示一个链接以显示画廊为缩略图。

Display gallery of thumbnails via NextGen gallery plugin

资源

Whether you’re satisfied with WordPress’s core functionality or ready to try one of the many free or premium gallery plugins available, you can create attractive and engaging galleries in just a few clicks.

使用WordPress网站上的HubSpot工具,并在不处理代码的情况下连接两个平台。点击这里了解更多。

使用WordPress网站上的HubSpot工具,并在不处理代码的情况下连接两个平台。点击这里了解更多。

Originally published Oct 4, 2019 1:48:09 PM, updated September 01 2021

Topics:

WordPress Website