Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Conditional PHP includes on WordPress Re: Conditional PHP includes on WordPress

#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’);
}
?>

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