Amesey
Amesey

Reputation: 852

Conditional if statement / is_page not working in WordPress 3.0

I've tried a number of variations and I know this works when I put in is_home even though that's not what I'm trying to achieve but it displays it on every page.... if I try anything else like is_front_page or like what I have in the example below which is what I'm actually trying to achieve then it doesn't (work!). Can anyone help please?

<?php if (is_page('about')) { ?>
    <div id="testimonial-block" class="sidebar-block clearfix">
    <h4>Testomonials</h4>
    <p>"I feel so much more motivated and in control of my life. The coaching has given me the time to think about what I really wanted to achieve and how I can make it happen. I have been completely blown away by how much I have enjoyed coaching with Becky and embraced the concept across my whole life."<br />
    <small>Caroline Rowe, <br />
    Communications Manager</small></p>
    </div>
    <?php } ?>

Upvotes: 0

Views: 2239

Answers (2)

Amesey
Amesey

Reputation: 852

fixed it! it put this in<?php wp_reset_query(); ?>

Upvotes: 1

kenzaraque
kenzaraque

Reputation: 378

the code looks fine.

the is_page() function does a case-sensitive string comparison ( i believe).

Check for the letter casing.. and see if it works.

Upvotes: 0

Related Questions