• I’ve just upgraded to 3.04, but didn’t backup my functions.php before doing so. I’m using a child theme of Twenty Ten and think I have lost a custom function that displays my latest posts (with a thumbnail) on the homepage. This is the code I’ve been using to display the latest posts:

    <div id="homepage">
    <div class="post">
    <h2>NEW</h2>
    <?php
    $latestposts = get_posts('numberposts=10');
    foreach($latestposts as $post) :
       setup_postdata($post);
    ?>
    <div id="hplist">
    <ul><li>
    <div class="thumb"><a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a></div>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <?php the_excerpt(); ?></li></ul>
    </div><!-- end hplist -->
    <?php endforeach; ?>
    </div<!-- end post-->
    </div><!-- end homepage -->

    I think I’m missing a function that uses dp_attachment_image

    I’ve been searching the web for a while now but can’t find a solution so I’m hoping someone in the forum can offer some assistance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Lost function during upgrade to call latest posts with thumbnails’ is closed to new replies.