Plugin echos text from shortcode function in gutenberg page editor

I’m creating a plugin to load custom posts by custom taxonomy (restaurant menu plugin).. I’m calling the main function (holds everything) by the add_action hook on ‘init’ and inside it I have another function that is using the new Wp_query to load these custom posts content.

I add a shortcode to this function and placed it in the gutenberg widget editor. The content is loading perfectly in the main restaurant menu page, however I can also see the echos in the gutenberg editor of the menu page….

What am I doing wrong?

Read more here:: Plugin echos text from shortcode function in gutenberg page editor

Leave a Reply

Your email address will not be published. Required fields are marked *