Add a class to the first teaser on /blog page On a site I'm developing the first blog teaser on the blog index page /blog is displayed bigger than the other teasers. I do this with a class 'featured', can I add a function in template.php to add this class to the first blog teaser on the /blog page?

Thanks for your time
In the template_preprocess_node hook you can use $vars['id'] to get the array index in the order that the nodes are printed.

You'll need to replace COND_FOR_BLOG with whatever logic you have for checking that.

Example to get you started:

function THEME_OR_MODULE_preprocess_node(&amp;$vars) {
  if (COND_FOR_BLOG &amp;&amp; $vars['id'] == 1) {
    $vars['classes_array'][] = 'featured';
  }
}


Edit: Note that $vars['id'] is not zero-based so $vars['id'] == 1 actually gives the first post.