Support

Account

Home Forums Gutenberg Get data from block in different page Reply To: Get data from block in different page

  • @ignitionmedia82 I had two replies on this thread above. In my first reply, the custom_get_acf_block_ids_from_post() function gives an example of getting the block id(s) from your page so that you can use it as your selector. You could query for all blocks and then loop through the results looking for any testimonial blocks, or pass the block type(s) as an array of what you want to filter by. Combine those results with the get_field_from_block() function from my 2nd reply and you should be good to go, I believe.

    edit: realized I may have misunderstood your question. Do you mean the actual $selector parameter? That’s the name of your ACF field, the same as if you were using get_field() on a normal post. get_field_from_block( 'my_acf_author_name', 2, 'block-1234567890' )