Create shortcode with external file
Use this to create a detached shortcode that is linked to another file.
Code Markup
function shortcode_detached_func() {
ob_start();
echo '<div class="review-procon-Logic">';
include(plugin_dir_path( __FILE__ ) . 'includes/external-file.php');
echo '</div>';
$shortcode_detached = ob_get_clean();
return $shortcode_detached;
}
add_shortcode('shortcode_display', 'shortcode_detached_func');