Title: IF Statement problem&#8230;
Last modified: August 19, 2016

---

# IF Statement problem…

 *  [michaelmcguk](https://wordpress.org/support/users/michaelmcguk/)
 * (@michaelmcguk)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/)
 * Hi,
 * I wish to have an IF statement that checks for a subfolder called ‘zenphoto’ 
   in my web address.
 * So if my site is [http://www.mysite.com/testfolder/zenphoto/](http://www.mysite.com/testfolder/zenphoto/)
   then it will echo out the code.
 * Can anyone please assist?
 * Many thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [DianeV](https://wordpress.org/support/users/dianev/)
 * (@dianev)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/#post-702585)
 * What code did you want it to echo?
 *  Thread Starter [michaelmcguk](https://wordpress.org/support/users/michaelmcguk/)
 * (@michaelmcguk)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/#post-702586)
 * Hi,
 * Just something like:
 *     ```
       <link rel="stylesheet" href="<?php echo $zenCSS ?>" type="text/css" />
       	<script type="text/javascript" src="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/plugins/rating/rating.js"></script>
           <link rel="stylesheet" href="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/plugins/rating/rating.css" type="text/css" />
           <link rel="stylesheet" href="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/js/thickbox.css" type="text/css" />
       	<script src="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/js/jquery.js" type="text/javascript"></script>
       	<script src="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/js/thickbox.js" type="text/javascript"></script>
       	<script type="text/javascript">
       	  function toggleComments() {
             var commentDiv = document.getElementById("comments");
             if (commentDiv.style.display == "block") {
               commentDiv.style.display = "none";
             } else {
               commentDiv.style.display = "block";
             }
       	  }
       	</script>
   
           <?php printRSSHeaderLink('Gallery','Gallery RSS'); ?>
       	<?php zenJavascript(); ?>
       ```
   
 *  [Kalessin](https://wordpress.org/support/users/kalessin/)
 * (@kalessin)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/#post-702587)
 * A simple check for the existence of the string “zenphoto” (not case sensitive)
   in the URL:
 *     ```
       if ( stristr($_SERVER['REQUEST_URI'], 'zenphoto') == true )
       {
       	// display zenphoto stuff
       }
       ```
   
 *  Thread Starter [michaelmcguk](https://wordpress.org/support/users/michaelmcguk/)
 * (@michaelmcguk)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/#post-702591)
 * Brilliant, worked a treat. I REALLY should know that one.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘IF Statement problem…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [michaelmcguk](https://wordpress.org/support/users/michaelmcguk/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/if-statement-problem/#post-702591)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
