Skip Navigation

[Closed] I need to have images popup in a lightbox

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.98 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 4 replies, has 3 voices.

Last updated by Mateus Getulio 3 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2726041

Tell us what you are trying to do? My client wants to have the same image popup in a lightbox. This is a nested view.

Is there any documentation that you are following? No.

Is there a similar example that we can see? No. Just a lightbox.

What is the link to your site? hidden link Scroll to the bottom and look at floorplans. Basically, need the best practice to have each image pop up in a lightbox.

#2726796

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2024-08-22 at 09.01.56.png

Hi there

The Image Block settings includes the option to open images in a Lightbox (under Link Settings). See the screenshot.

#2727226

Thank you. I am used to using Views still. The block editor is good.

#2727251

Hey, I just looked over this and the image is a background and not an image. Do you have any thoughts on it? I presented two options, but I am curious if we would stick with the BG image and have it with a popup so they can benefit from CSS contain, etc, etc.

#2727577

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

To implement it on the legacy view, I suggest you try with WordPress built-in lightbox feature, for example:

1) Add below codes into your theme file "functions.php":

add_action('wp_enqueue_scripts', 'add_thickbox');

2) Edit your view, setup HTML link codes to display the feature image manually, for example:

for featured image:

<a href="[wpv-post-featured-image size="full" output="url"]" rel="gallary-[wpv-post-id item="$current_page"]" class="thickbox">[wpv-post-featured-image]</a>

for custom image field:

<a href="[types field='custom-img' size='full' output='raw'][/types]" rel="gallery-[wpv-post-id item="$current_page"]" class="thickbox">[types field='custom-img'][/types]</a>

More help:
https://developer.wordpress.org/reference/functions/add_thickbox/
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-featured-image

Alternatively, you could also use a third-party solution for the lightbox like "WP jQuery Lightbox": https://wordpress.org/plugins/wp-jquery-lightbox/

Can you please check if this answer your question, please let me know otherwise and I'll reassess.

Thank you,
Mateus

The topic ‘[Closed] I need to have images popup in a lightbox’ is closed to new replies.