1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need Help With Teasers

Discussion in 'PHP' started by kiteguy123, May 24, 2009.

  1. #1
    Hey guys.

    I've recently got a wordpress theme made custom for me, and one of the features it that it has teasers. So, there's the latest post in big at the top, then underneath that theres smaller boxes with the other posts in.

    The problem is, the latest post is showing in the big box and one of the little boxes.

    Any idea how to remove the latest post from the teasers?

    Thanks in advance,
    Simon
     
    kiteguy123, May 24, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Can you post the code for the teasers section of the template? There are probably 50 ways to do this, so it's hard to figure out how yours needs to be modified without seeing the actual code.
     
    jestep, May 24, 2009 IP
    kiteguy123 likes this.
  3. kiteguy123

    kiteguy123 Well-Known Member

    Messages:
    1,592
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    115
    #3
    Sure. Here's index.php:

     
    kiteguy123, May 25, 2009 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    It looks like there are a few problem is with this line:

    <?php if ($postnum >=3) echo "<div class=\"row\">"; ?>

    There's nothing to close this division further down, and the first post would still be displayed again.

    Try replacing from <?php if ($postnum >=3) echo "<div class=\"row\">"; ?>

    to <div class="separ"></div> with this:

    
    <?php if($postnum > 1): ?>
    <div class="post col" id="post-<?php the_ID(); ?>">
        <div class="excerpt">
            <img src="<?php echo get_post_meta(get_the_ID(), 'postThumb', true); ?>" height="66" width="66" alt="" />
        </div>
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    	<h4 class="meta"><?php the_time('F jS, Y') ?> &middot; <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></h4>
        <div class="entry">
        <?php the_excerpt('[Read more &rarr;]'); ?>
        </div>
    	<p class="tagged"><strong>Tags:</strong> <?php the_category(' &middot; ') ?></p>
    </div>
    <div class="separ"></div>
    <?php endif; ?>
    
    PHP:
     
    jestep, May 25, 2009 IP