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 Link to comment https://forums.phpfreaks.com/topic/283906-need-help-with-basic-newb-php-syntax/ 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 Link to comment https://forums.phpfreaks.com/topic/283906-need-help-with-basic-newb-php-syntax/#findComment-1458324 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.