Wordpress is_front_page if statment
Posted
by
Anders Kitson
on Stack Overflow
See other posts from Stack Overflow
or by Anders Kitson
Published on 2010-12-27T00:24:25Z
Indexed on
2010/12/27
0:53 UTC
Read the original article
Hit count: 201
I have the following code below. I am trying to get rid of the box articles div when I am on the home page the code works when the html is outside of the else portion of the IF statement, as soon as I put it inside the page goes blank, I can't seem to figure out where I have broken the code. Any help would be great.
<?php
if(is_front_page())
{
if(function_exists('wp_content_slider')) { wp_content_slider(); }
} else{ ?>
<div class="box articles">
<div class="block" id="articles">
<h2><?php the_title(); ?></h2>
<div class="article">
<div class="entry">
<?php the_content(); ?>
</div>
<?php edit_post_link('Modifca Contenuto.', '<p>', '</p>'); ?>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<?
}
?>
© Stack Overflow or respective owner