• here the blog

    I’m trying to add some text right before the title heading of the first post, but everytime I add the code in index.php, it gets duplicated 3 times, so basically the next 2 articles will have the text in front of their title as well.

    this is the code from index.php

    <?php $countervariable=1; if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="Post" style="padding-bottom: 50px;">
    <div class="PostHead">
    <h1 class="title"><a href="#"></a><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1><!-- google_ad_section_end -->
     <p class="PostDate">
    
       <strong class="day"><?php the_time('d'); ?></strong>
       <strong class="month"><?php the_time('M'); ?></strong>
     </p>
      <p class="PostInfo">Posted by <?php the_author() ?> as <em><?php the_category(', ') ?></em></p>
    </div>
       <div class="KonaBody">
    <div class="PostContent">
    
    <?php if(is_home() && $post==$posts[0]): ?>
    
    <?php endif ?>

    any ideas why?

    thank you

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Repeating code, how to stop that’ is closed to new replies.