Add shortcode with add action in functions file

//Add shortcode with add action in functions.php 
function your_custom_function_name() {
if (is_front_page ()){
 echo ('<div class="your-custom-class">' . do_shortcode("[your-shortcode ]") . '</div>');
}
}
add_action( 'theme or plugin hook here', 'your_custom_function_name', 20 );
echo do_shortcode('[your shortcode here]');
No Comments

Sorry, the comment form is closed at this time.