I'm a beginner and likely approaching this all wrong, but I have a custom post type called "Food Menu Items". I want to output the Title/Content of each CPT on a different PAGE using a shortcode inside the standard Gutenberg/block editor.
Here's the code I've added to the Metabox Views Template area:
{% set args = {post_type: 'food-menu-item', %}
{% set menuitems = mb.get_posts( args ) %}
{% for menuitem in menuitems %}
<h4>{{ menuitem.post_title }}</h4>
{% endfor %}
I've set the "Type" to shortcode, and published the View. After adding the shortcode to the page using the shortcode block, I'm getting this error and can't save the page:
"Updating failed. The response is not a valid JSON response."
Any ideas?