get_the_ID()
returning 1 for every post in Query Loop
block
#49840
Labels
[Block] Query Loop
Affects the Query Loop Block
Needs Testing
Needs further testing to be confirmed.
[Status] Duplicate
Used to indicate that a current issue matches an existing one and can be closed
Description
I created custom post type with custom field
youtube_url
and in Query Loop block it's impossible for me to access /show that value to the user, so I tried making custom shortcode and putting the Shortcode block inside Query Loop/Post Template with value[inject_yt_url]
and then creating that shortcode with following code using Code Snippets pluginbut it didn't work so I tried just showing ID using this code:
and it always shows
1
and I also tried this with the same result:
Step-by-step reproduction instructions
above
Screenshots, screen recording, code snippet
No response
Environment info
WP 6.2
Nginx
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: