Homepage IF statement, to show only certain DIV containing LOOP
-
Hi Guys,
I am trying to have two seperate categories on my homepage, so i can show only certain posts in one column, and others in the other.
However i only want the certain posts to show on the homepage so i have tried using a IF statement but it is giving me an error when used with the loop.
Any ideas would be most appreciated.
Thanks
<?php if (is_home()) echo '<div> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="header"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <span class="date"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></span> <span class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span> </div> </div>'?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Homepage IF statement, to show only certain DIV containing LOOP’ is closed to new replies.