Skip to content

Instantly share code, notes, and snippets.

View schikulski's full-sized avatar

Simen Schikulski schikulski

View GitHub Profile
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>