USING NATIVE (WITHOUT A PLUGIN) GUTENBERG CUSTOM FIELDS AND USING THEM IN THE QUERY BLOCK (If you use Advanced Custom Fields (free version) it seems to work the same way--not sure experimentation needed here, but you don't need to do the php in functions below, but you still have to do step 3 below.) Here is a video for Advanced Custom Fields PRO (paid version, which I think always needed) https://devblondie.com/en/create-gutenberg-blocks-with-advanced-custom-fields-pro-like-a-pro-%F0%9F%94%A9/ Original video link: https://www.youtube.com/watch?v=uMtqXVAoXVI 1. Create the custom field in a WordPress post, page or post type (first ensure that in Preferences, custom fields are set to display) at the bottom of the page. 2. Add the following code in functions.php to "register" or add a custom field. //register custom fields (with php tags of course) add_action( 'init', 'myCustomFieldsRegistrationFunction'); // init (and soour function) fires in WP before most content is loaded, so this ensures meta data (custom fields) are registered before posts are processed. function myCustomFieldsRegistrationFunction() { register-meta ( //register meta data (custom fields here) 'post', //register for post objects 'myCustomFieldName', // name of your custom field as defined in the WP post array( //define how meta data behaves 'show_in_rest' => true, //make meta data available to REST api 'single' => true, //ensures that only one alue is stored for this meta field per post 'type' => 'string', //define data type as string of text 'sanitize_callback' => 'wp_strip_all_tags' //remove any code or html tags ) ); } 3. insert the following (json) code within the query block (in this example, its's after the excerpt block and before the post date block) by using the code editor and inserting a paragraph whose content is the value of the custom field in the post:

Define the paragraph: className - puts a class name on the element (paragraph) so we can later style it with css. metadata and bindings - "binds" or links post metadata to this paragraph source is the posts meta data args key value pair, value is the name you gave your custom field in function.php Actually display the paragraph: The value of the custom field will display inside "

" NOTE: THIS WILL JUST SHOW UP AS A PLAIN PARAGRAPH IN GUTENBERG ADMIN PANEL WHEN NOT IN CODE MODE. But it will dispaly the value of the custom field. the next element in the query block AFTER OUR CUSTOM POST and so on ---don't include this in code above.