Block content rendering on the top just below body tag
render_callback() should return the output just like shortcode. Instead of echoing it.
render_callback() should return the output just like shortcode. Instead of echoing it.
I found the solution. I can include a javascript with callback function for each block in the ACF documentation.
When editing in block editor, the post/article gets under the floating widgets
How to integrate plugins into block editor
How to make a block similar to another block
Editor width automatically reduced – text is wrapped after 1 character
Cannot Create A Page or Post in WordPress 5.2.1
Figured it out, after half a day of banging away and asking a team mate. In the wpscholar link above I changed this line of code. // Surface all Gutenberg blocks in the WordPress REST API $post_types = get_post_types_by_support( [ ‘editor’ ] ); // change this line $post_types = [‘post’, ‘page’, ‘post-revision’]; // to this … Read more
Using birgire’s suggestions, I came up with the following solution that is working well with both the old pre-WP 4.x data and the newer posts that have been added under 5.0. // if there is a gallery block do this if (has_block(‘gallery’, $post->post_content)) { $post_blocks = parse_blocks($post->post_content); $ids = $post_blocks[0][attrs][ids]; } // if there is … Read more
WordPress Gutenberg Ajax request