Title: DIV inside of PHP Conditional Tag Errors
Last modified: August 18, 2016

---

# DIV inside of PHP Conditional Tag Errors

 *  Resolved [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * (@altexasgirl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/div-inside-of-php-conditional-tag-errors/)
 * Hi –
 * I’m putting a div box at the bottom of my wordpress blog, but I only want it 
   to show on the home page. When I wrapped by div in conditional tags, I kept getting
   an error. Is there a specific way to wrap div’s – that contain additional php
   coding – around php conditional tags.
 * Here is what I have so far –
 * `
    <div class="logbg"> <div class="logtop"><div class="main_title">More Featured
   Articles</div></div> <div class="main_post"> <?php c2c_get_recent_posts(3); ?
   > </div> </div> <div class="logbot"></div>
 * Thanks!

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/div-inside-of-php-conditional-tag-errors/#post-493745)
 * So you’ve tried this:
 * `<?php if( is_home() ) : ?>
    <div class="logbg"> <div class="logtop"><div class
   ="main_title">More Featured Articles</div></div> <div class="main_post"> <?php
   c2c_get_recent_posts(3); ?> </div> </div> <div class="logbot"></div> <?php endif;?
   >
 * and it doesn’t work? If so, what is the error you mention?
 *  Thread Starter [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * (@altexasgirl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/div-inside-of-php-conditional-tag-errors/#post-493849)
 * actually I did not try that one! Thanks so much! That did the trick and its working
   fine.

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

The topic ‘DIV inside of PHP Conditional Tag Errors’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/div-inside-of-php-conditional-tag-errors/#post-493849)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
