I'd like to have the flag banner in our Expressionengine Discussion Forum appear only on the forum homepage.

I'm taking a college php class but we haven't gotten far enough for me to know how to write the code. Any help is greatly appreciated.

  • I don't have forum, so I'm writing this as a comment rather than an actual answer. But you'd want a PHP if statement, that would read something like <?php $base_url = "http://www.medicare-cms.com/forums" if($base_url == "{appropriate PHP SERVER URI}") include('header-main.php'); else include('header.php'); ?> My PHP is crap, so there's probably a missing semi-colon somewhere, but that's kind of the basic idea. Commented Jan 6, 2013 at 21:37

2 Answers 2


Something like this should do the trick:

     $url = $_SERVER['REQUEST_URI'];
     $segment = explode("/", $url);

     if ($segment[2] == ""){
       echo "<img src='/path/to/image/'>";

This says if segment #2 is equal to blank display the banner. So the banner will only show when the URL is /forum/.


You can edit the /themes/forum_themes/developer/forum_index/forum_homepage.html file. I put a banner, for example, between these code snippets:

<img src="/uploads/forum-banner.png" alt="" />
<div class="fm-header-wrapper">

Only the home page gets this banner. All forum themes, as near as I can tell, have this file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.