• Resolved welshhuw

    (@welshhuw)


    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)
  • 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

    (@welshhuw)

    Thanks.!

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

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