‘endif’ for 2 ‘if’ functions but not wanting to end the first ‘if’
-
I’m a bit stuck. For my website I want a different sidebar on the homepage than on other pages.
I have ried the script below, but it’s not working. The ‘endif’ kills the first ‘if’, but this one I need to continue for the script to work.
How can I use ‘if’ twice and ‘endif’ whereby ‘endif’ doesn’t end the first ‘if’?
Thanks
<div id="mainright"> <?php if ( is_home()) { ?> <div id="sidebar" class="clearblock"> <ul> <li id="sidebartabs"> <?php include (TEMPLATEPATH . "/sidebartabs.php"); ?> </li> <li> <?php include (TEMPLATEPATH . '/sponsors.php'); ?> </li> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?> <?php endif; ?> </ul> </div> <?php } else { ?> <div id="sidebar" class="clearblock"> <div class="feed"> <h2 class="sh">Subscribe here </h2> <?php $feed = get_option('sdf_feed')?> <form action="https://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('https://feedburner.google.com/fb/a/mailverify?uri=<?php echo($feed); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <input type="text" class="input" value="Sign Up here for email feed..." onfocus="if (this.value == 'Sign Up here for email feed...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Sign Up here for email feed...';}" name="email"/> <input type="hidden" value="<?php echo($feed); ?>" name="uri"/> <input type="submit" class="sbutton" value="Submit" /> </form> </div> </div> <?php } ?> </div>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘‘endif’ for 2 ‘if’ functions but not wanting to end the first ‘if’’ is closed to new replies.