Title: simonsharks's Replies | WordPress.org

---

# simonsharks

  [  ](https://wordpress.org/support/users/simonsharks/)

 *   [Profile](https://wordpress.org/support/users/simonsharks/)
 *   [Topics Started](https://wordpress.org/support/users/simonsharks/topics/)
 *   [Replies Created](https://wordpress.org/support/users/simonsharks/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/simonsharks/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/simonsharks/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/simonsharks/engagements/)
 *   [Favorites](https://wordpress.org/support/users/simonsharks/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [What Is <head profile=”http://gmpg.org/xfn/11″> ?](https://wordpress.org/support/topic/what-is-lthead-profilehttpgmpgorgxfn11gt/)
 *  [simonsharks](https://wordpress.org/support/users/simonsharks/)
 * (@simonsharks)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/what-is-lthead-profilehttpgmpgorgxfn11gt/#post-899708)
 * Just use `<head>`
 * I am writing a theme and wondering if I should include this profile, it seams
   like a lot of themes do.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Giving last post a different style from recent posts](https://wordpress.org/support/topic/giving-last-post-a-different-style-from-recent-posts/)
 *  [simonsharks](https://wordpress.org/support/users/simonsharks/)
 * (@simonsharks)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/giving-last-post-a-different-style-from-recent-posts/#post-748835)
 * I have posted some code to determine the first or last post at [Last Post in The Loop](http://wordpress.org/support/topic/161176?replies=4#post-918409)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [The Loop – Last Post / Next & Prev](https://wordpress.org/support/topic/the-loop-last-post-next-038-prev/)
 *  [simonsharks](https://wordpress.org/support/users/simonsharks/)
 * (@simonsharks)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/the-loop-last-post-next-038-prev/#post-910630)
 * I have posted some code to determine the first or last post at [Last Post in The Loop](http://wordpress.org/support/topic/161176?replies=4#post-918409)
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Last Post in The Loop](https://wordpress.org/support/topic/last-post-in-the-loop/)
 *  [simonsharks](https://wordpress.org/support/users/simonsharks/)
 * (@simonsharks)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/last-post-in-the-loop/#post-711236)
 * 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
       ?>
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)