Question: For example, inside the loop could i do something like this

```
if lastpost { 
}
else {
}

```

Answer: 
I've coded up a quick little example for you. Should explain how to get the first and last post in a WP loop.

```
    $post_count = 0;
    $total = count($posts);

    while (have_posts()) : the_post();

        if ($post_count == 1 AND $post_count !== $total)
        {
            // This is the first post
        }

        if ($post_count == $total)
        {
            // This is the last item
        }

        $post_count++;

    endwhile;

```
```
if (!get_previous_post_link()) { 
    echo 'the last post here'; 
}

```

OR 

```
if (get_next_post_link()) { 
    echo 'the last post here'; 
}

```