Question: I have more or less completed the design for my website (built in Wordpress) and I have a slider in my header.php that currently shows on every page. I would like for this to only appear on my homepage - I've got to think there is an easy snippet of code to implement that can either check for a home page argument or page specific URL or something that only uses this code on that page.

Here is my slider code, currently in header.php, that I would like to have in some sort of argument structure that only pops on the homepage. Hoping someone has the key!

```
<div class="art-pageslider">

     <div class="art-shapes">
            </div>
<div class="art-slider art-slidecontainerpageslider" data-width="930" data-height="200">
    <div class="art-slider-inner">
<div class="art-slide-item art-slidepageslider0">

</div>
<div class="art-slide-item art-slidepageslider1">

</div>
<div class="art-slide-item art-slidepageslider2">

</div>
<div class="art-slide-item art-slidepageslider3">

</div>
    </div>
</div>
<div class="art-slidenavigator art-slidenavigatorpageslider" data-left="0" data-top="1">
<a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a>
</div>

</div>

```

Answer: 
Use [is\_front\_page()](http://codex.wordpress.org/Function_Reference/is_front_page) to test if you are in the index template

```
<?php if( is_front_page() ): ?>

   <!-- your slide code -->

<?php endif; ?>

```
Use [`is_front_page()`](http://codex.wordpress.org/Function_Reference/is_front_page):

```
<?php if(is_front_page() ) { ?>
    <!-- Slider HTML Code Here -->
<?php } ?>

```

### From Wordpress Codex:

> 
> If you are using a static page as your front page, this is useful: 
> 
> 
> 
> ```
> <title>
> <?php bloginfo('name'); ?> &raquo; <?php is_front_page() ? bloginfo('description') : wp_title(); ?>
> </title>
> 
> ```
> 
>