-
kevinbk
I tried to use the Shortcode [acf field=”lista”] inside the QueryLoop and it does not work, the same shortcode that I already use on the page, but inside the query it does not work, as if I were trying to retrieve the field of the current post and not from the queryloop post.
The same happens if I use Dinamic Post_meta the same as the image that was sent. It is also blank if there is nothing in the postmeta table, are you sure it is running get_field? Because get_field is to work.
-
Shortcode does not work in query loop, it’s a WP thing.
You will need to use
render_block()
todo_shortode()
.Something like this:
https://generate.support/topic/reading-time-with-generateblocks/#post-86125 -
kevinbk
Is there a way to make the dynamic meta_post query get_field instead of get_post_meta? It seems he said there’s a way, but I still don’t understand. By default, it’s not working. I would prefer to use the default to display the custom_fields that make ganbiarra with shortcodes and block renderer.
-
If you are using GB PRO, when pulling the dynamic post meta from the dropdown list, GB should be using
get_field()
.But if you do not have GB Pro, there isn’t a way to switch
get_post_meta()
toget_field()
within the blocks, unfortunately.Unless you use
render_block()
to render each block usingget_field()
. -
kevinbk
So, there’s the problem, I’m using GB PRO, how do I know it’s really pulling get_field? Because it still doesn’t work in queryloop using Dynamic Post Meta.
-
kevinbk
Aaaaah, Now I understand what you were talking about. If I use the option inside the block, it will work, only the one in the floating menu does not work. Now everything is solved, thank you very much!
-
Glad to hear that 🙂 Sorry I didn’t make it clear that the GB options are in the sidebar.
-
kevinbk
I’m sorry, as I’m not fluent in English I get totally lost in the conversations, even using translation. And sometimes I can’t express myself correctly just with the translation.
-
No worries, all good! 🙂
- You must be logged in to reply to this topic.