Title: Conditional statement help
Last modified: August 20, 2016

---

# Conditional statement help

 *  [Angie Meeker](https://wordpress.org/support/users/ameeker/)
 * (@ameeker)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/)
 * I’m still learning conditional statements, but I need to use one for a piece 
   of a client’s site. The site I inherited uses this piece of code below to display
   a slider on every page. I need to NOT display that slider on ONE page only, and
   instead display one particular graphic.
 * Can someone help me piece that together? It would be within the div feature, 
   taking the place of featurearea (you can see the site at owenlawyers dot com 
   if you need to look. I’ll need to display one graphic at the drunk driving page
   to replace all of the random stuff between the header/nav and content areas)
 *     ```
       <?php }
       function slide_header() { ?>
       	<div class="contentSlide">
       		<div id="feature">
       			<div id="featurearea" class=" fix">
       				<div class="slideshow">
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide1.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide2.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide3.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide4.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide5.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide6.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide7.jpg" />
       				</div>
       			</div>
       			<div id="feature-footer" class="fix thumb_nav">
       				<div id="featurenav">
       					Criminal Defense Lawyers Located in Columbus, Ohio
       				</div>
       			</div>
       			<div class="clear"></div>
       		</div>
       	</div>
       ```
   

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

 *  [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736202)
 * Just wrap things with [`is_page()`](http://codex.wordpress.org/is_page). You 
   can pass in the page ID or the page slug.
 * So …
 *     ```
       <div id="feature">
         <?php if ( is_page( 'drunk-driving' ) ) { ?>
           <div id="drunk-driving">
             ...
           </div>
         <?php } else { ?>
           <div id="featurearea">
             ...
           </div>
         <?php } ?>
         <div id="feature-footer">
           ...
         </div>
         <div class="clear"></div>
       </div>
       ```
   
 *  [johnbhartley](https://wordpress.org/support/users/johnbhartley/)
 * (@johnbhartley)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736205)
 * What he said… the main thing is the
 *     ```
       <?php if ( is_page( 'drunk-driving' )) { ?>
   
       <?php } else { ?>
   
       <?php } ?>
       ```
   
 *  Thread Starter [Angie Meeker](https://wordpress.org/support/users/ameeker/)
 * (@ameeker)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736207)
 * How does this look?
 *     ```
       <div id="feature">
         <?php if ( is_page( 'drunk-driving' ) ) { ?>
           <div id="drunk-driving">
             <a href="http://www.columbusduiattorneys.com/register-for-your-free-dui-defense-guide/"><img src="http://owenlawyers.com/images/sample-image.png"></a>
           </div>
         <?php } else { ?>
           <div id="featurearea">
             <div id="featurearea" class=" fix">
       				<div class="slideshow">
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide1.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide2.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide3.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide4.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide5.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide6.jpg" />
       					<img src="http://owenlawyers.com/wp-content/themes/thesis_182/custom/images/featureslide7.jpg" />
       				</div>
       		</div>
           </div>
         <?php } ?>
         <div id="feature-footer" class="fix thumb_nav">
       				<div id="featurenav">
       					Criminal Defense Lawyers Located in Columbus, Ohio
       				</div>
       	</div>
       			<div class="clear"></div>
       </div>
       ```
   
 *  [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736214)
 * That’ll do it 🙂
 *  Thread Starter [Angie Meeker](https://wordpress.org/support/users/ameeker/)
 * (@ameeker)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736215)
 * Thanks, Eric.
 * Again.
 * 😉

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

The topic ‘Conditional statement help’ is closed to new replies.

## Tags

 * [conditional statement](https://wordpress.org/support/topic-tag/conditional-statement/)

 * 5 replies
 * 3 participants
 * Last reply from: [Angie Meeker](https://wordpress.org/support/users/ameeker/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/conditional-statement-help-1/#post-2736215)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
