Sometimes you want to style only the last post in a WordPress loop or you may want to add a comma at the end of every post except the last one. Here’s an example of how to do that:
This example removes the Orbit Custom Post Type from the Cornerstone responsive starter theme. You would include it in the functions.php of your child theme. The example can be adapted for any Custom Post Type used in any theme.
The example adds support for the Custom Post Type named ‘portfolio’. You would add this function to the functions.php in your theme or a plugin: