How to Create a WordPress Lightbox Without a Plugin

How to Create a WordPress Lightbox Without a Plugin

Since the version 6.5update, we can create a WordPress lightbox without a plugin, which makes adding images much easier.

However, because this feature is available in the new version of WordPress, this method only applies if you are using the WordPress Block Editor.

Before proceeding with the necessary steps, please note that this tutorial uses WordPress in English (default). If you are using another language in WordPress, you can adjust accordingly.

Let's get started. Here are the steps to create a WordPress lightbox without a plugin.

1. Log in to WordPress

If you have not yet logged in to your WordPress website, you can log in first using a user account that has access to edit or add articles.

Usually, you can use one of the following links to log in to WordPress if you are not using a custom login URL.

  • https://namadomain.tld/wp-login.php
  • https://namadomain.tld/login
  • https://namadomain.tld/wp-admin

*make sure to change domainname.tld with your domain name.

2. Create or Edit a Post

Once you are on the WordPress dashboard page, you can create a new post or edit an existing post or page.

If you want to create a new post, you can open the menu Posts > Add new post, and if you are creating a page, you can open the menu Pages > Add new page

3. Add an Image Widget

Now that you are on the page to write a new article using the Block Editor, you can immediately add an image widget by typing /image inside the editor so you can add the image widget.

4. Add an Image

Once you have added the Image Widget, you can then add the image you want to use in the post or page you are creating.

You can choose an image that is already in the Media Library, or you can upload a new image if you do not have one yet.

5. Add a Lightbox

We have now reached the most important step for creating a WordPress lightbox without a plugin. To create a lightbox, you just need to click on the image you have added, then click on the link icon.

You can then select the option Expand on click to enable the lightbox for that image.

6. Preview and Publish the Page

After everything is finished, you can check the appearance of the lightbox you created. Once it is successful and looks the way you want, you can publish the page or save it as a draft first.

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...