Closed jamieburchell closed 3 months ago
I don't have a solution for you at the moment, I did post to the Elementor issue with a note about how we detect the current item in a loop.
I'm going to add another shortcode option to bypass the in_the_loop() check and just get the current post type / ID regardless.
In Pods 3.1.5, you'll be able to bypass the loop check by using bypass_detect_loop="1"
in the shortcode.
Thank you for adding the workaround. It's just strange that it's necessary only on an archive page.
Description
These PODS shortcodes do not work when used in an Elementor Loop Grid template where the Loop Grid is added to an Archive template:
[pods field="example_field"]
[pods]{@example_field}[/pods]
They do work when adding the Loop Grid to a non-archive template.
The issue as reported here:
https://github.com/elementor/elementor/issues/24048
It seems that the automatic detection of being in the loop does not work correctly in this context.
Version
3.1.1
Testing Instructions
Screenshots / Screencast
No response
Possible Workaround
I can workaround the issue by adding my own shortcode which explicitly retrieves the current post from the loop:
Site Health Information
Pods Package
No response