Title: Parse Error &#8211; Widgets
Last modified: August 19, 2016

---

# Parse Error – Widgets

 *  Resolved [welshhuw](https://wordpress.org/support/users/welshhuw/)
 * (@welshhuw)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/parse-error-widgets/)
 * Hi,
 * I have declared three new widget areas on my homepage, but am getting this error
   when trying to view it:
    _Parse error: parse error in C:\wamp\www\3.0\wp-content\
   themes\ArtClass\homepage.php on line 38_
 * Here is the code snippet I am using:
 *     ```
       <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('left_column')) : else : ?>
                       <p class="title">What We Do</p>
                       <p>At Chatham Painting Classes Nowra, We teach a variety of painting classes during a variety of times and days.</p>
                       <div class="more-info"><a href="#">More Info on Painting Classes Nowra</a></div>
                   </div>
                   <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('center_column')) : else : ?>
                       <p class="title">Stop For A Chat</p>
                       <p>I believe that everyone can paint & I can show you as many techniques as you want to learn.</p><p>Our classes are small & friendly. We can have a chat & a cuppa, while creating our works of art!</p>
                       <div class="more-info"><a href="#">Chat with us at Painting Classes Nowra</a></div>
                   </div>
                   <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('right_column')) : else : ?>
                       <p class="title">View Our Gallery</p>
                       <p>Take a look at what has been created from our classes, by the people who attend.</p><p>I also add artwork, painted by myself, that is for sale. </p>
                       <div class="more-info"><a href="#">View our gallery at Painting Classes Nowra</a></div>
                   </div>
       ```
   
 * Please can someone explain why I am getting this error?
 * If I comment out the 3 widget code snippets the page shows as normal.
 * Thanks

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

 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/parse-error-widgets/#post-1666683)
 * There are no `endif;` lines for each of the `if()` conditions you have in the
   above code?
 * Try this…
 *     ```
       <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('left_column')) : else : ?>
                       <p class="title">What We Do</p>
                       <p>At Chatham Painting Classes Nowra, We teach a variety of painting classes during a variety of times and days.</p>
                       <div class="more-info"><a href="#">More Info on Painting Classes Nowra</a></div>
                       <?php endif; ?>
                   </div>
                   <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('center_column')) : else : ?>
                       <p class="title">Stop For A Chat</p>
                       <p>I believe that everyone can paint & I can show you as many techniques as you want to learn.</p><p>Our classes are small & friendly. We can have a chat & a cuppa, while creating our works of art!</p>
                       <div class="more-info"><a href="#">Chat with us at Painting Classes Nowra</a></div>
                       <?php endif; ?>
                   </div>
                   <div class="hp-col">
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('right_column')) : else : ?>
                       <p class="title">View Our Gallery</p>
                       <p>Take a look at what has been created from our classes, by the people who attend.</p><p>I also add artwork, painted by myself, that is for sale. </p>
                       <div class="more-info"><a href="#">View our gallery at Painting Classes Nowra</a></div>
                       <?php endif; ?>
                   </div>
       ```
   
 * Hope that helps.. 🙂
 *  Thread Starter [welshhuw](https://wordpress.org/support/users/welshhuw/)
 * (@welshhuw)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/parse-error-widgets/#post-1666914)
 * Thanks.!

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

The topic ‘Parse Error – Widgets’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [welshhuw](https://wordpress.org/support/users/welshhuw/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/parse-error-widgets/#post-1666914)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
