Action if image is empty

WooCommerce
18 March, 2025 09:32:53
lahtec
Topics: 1
Messages: 1
I have an image container with the following value:
[e2pdf-wc-product key="get_gallery_image_ids" path="0" attachment_image_url="true" size="full"]
The container has the ID 21.

Now I would like to adjust the position of another image by -50 pixels to the left if the image (with ID 21) is empty.

What exactly do I need to configure to achieve this?

Thank you in advance for your help!
18 March, 2025 09:51:26
E2Pdf
Support
Topics: 7
Messages: 3438
Hello,

In the "Actions" the shortcodes that output the value should be used, not the container IDs, so the condition should look as follows:

If [e2pdf-wc-product key="get_gallery_image_ids" path="0" attachment_image_url="true" size="full"] is empty, the block where the action is applied will be moved 50px to the left.
We would really appreciate your feedback at WordPress.org!