• Resolved altexasgirl

    (@altexasgirl)


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

    (@altexasgirl)

    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.