Just use <head>
I am writing a theme and wondering if I should include this profile, it seams like a lot of themes do.
I have posted some code to determine the first or last post at Last Post in The Loop
I have posted some code to determine the first or last post at Last Post in The Loop
Rather than use bigrodey77 static variable, you can use the WordPress variable $posts_per_page. So to determine the first and last post you could use:
<?php
$postCount = 0;
// Start of The Loop
if (++$postCount == 1) {
// FIRST POST
}
if ($postCount == $posts_per_page) {
// LAST POST
}
// End of The Loop
?>