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

```
if lastpost { 
}
else {
}

```

Answer: 
```
if ($wp_query->current_post +1 == $wp_query->post_count) {
    // this is the last post
}

```

Change $wp\_query to your own query variable if you made a new WP\_Query object.
```
if (!get_next_post_link()) { 
    echo 'the last post here'; 
}

```