Doing an if statement with a do_shortcode nested in it
-
I’m trying to do an if home or if front page statement in my header.php file and I’m getting an error since I have a piece of shortcode inside of it to get a slider widget inside of it. So this code won’t work:
<?php if ( is_front_page() && is_home() ) { echo ('<div id="moneyshot"><?php echo do_shortcode( '[responsive_slider]' ); ?></div>'); } ?>Any idea how to get the do_shortcode to work?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Doing an if statement with a do_shortcode nested in it’ is closed to new replies.