Home › Forums › Back End › Conditional PHP includes on WordPress › Re: Conditional PHP includes on WordPress
May 13, 2010 at 8:39 am
#75509
Tcooper
Member
Because what you are trying to do is all php you don’t need to keep switching in and out:
Code:
ID);
}else{
include(‘someotherfile.php’);
}
?>
}else{
include(‘someotherfile.php’);
}
?>
Although, I don’t think it would actually stop it from working – the syntax is still correct in what you have done. The other reasons it might not work are as follows:
-
is_category function doesn’t exist
get_video function doesn’t exist
someotherfile.php doesn’t exist
[/list:u]
Of course, it also won’t include if is_category(‘somecategory’) returns true :P