I'm used to creating custom shortcodes through my child theme and Elementor, never a problem.
However this time something is wrong, when I inserted the shortcode widget in Elementor editor my code is correctly showing, but after saving I visit the page, its blank, like the shortcode was never processed.
Anyone have any idea of why this is happening?
This is the code where i create the shortcode:
<?php
add_shortcode('test', function () {
ob_start();
require_once (locate_template('views/test.php'));
return ob_get_clean();
});
Inside the file views/test.php a simple form, nothing crazy.
This is the screen of Elementor editor where the shortcode is showing:
If i visit the page it's completely blank.
views/test.php
?