Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Change the way Generateblocks accesses post_meta

  • 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() to do_shortode().

    Something like this:
    https://generate.support/topic/reading-time-with-generateblocks/#post-86125

  • 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() to get_field() within the blocks, unfortunately.

    Unless you use render_block() to render each block using get_field().

  • 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.

  • 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.

  • 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! 🙂

Viewing 9 posts - 17 through 25 (of 25 total)
  • You must be logged in to reply to this topic.