How to create blocks from shortcodes?

I want the shortcode to output “full blocks” This is the wrong approach, instead you want a block that outputs a shortcode. Specifically, a block that is rendered via PHP. Once you know how to do that it becomes as trivial as calling do_shortcode and inserting block attributes into the shortcode by crafting it, e.g. … Read more

Why does have_posts() return false when in the wordpress admin, but not on the frontend?

To get your posts to display in the Gutenberg editor, you’ll likely need to create a separate query specifically for your custom block. This is because Gutenberg doesn’t use the main query in the same way the front end does. Something like this: $args = array( ‘post_type’ => ‘your_custom_post_type’, // Replace with your custom post … Read more