bgbs Posted November 15, 2013 Share Posted November 15, 2013 Ok, so Im using if else in WP <?php if ( is_home() ) { // This is a homepage } else { <!-- header image --> <div class="dynamic-header"><?php if(function_exists('show_media_header')){ show_media_header(); } ?></div> <!-- /header image --> } ?> What I'm trying to do is load dynamic header banner on other pages except for home page. But I know I can't call php within php, so how do I properly wrap the code after else statement? Thanks in advance Quote Link to comment Share on other sites More sharing options...
KaiSheng Posted November 15, 2013 Share Posted November 15, 2013 1) I do not know why you are using is_home or isnot_home or whatever to make a condition in this case. Using a session_id should be easier. 2) I do not know whether your is_home is a assigned variable or a link to a page. If its a variable, it should be, if ($is_home) { blahblah ... } or if (!$is_home) { blahblah } else { //is_home Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.