WordPress post arrangement using post_class

It just take a little bit more complicated logic:

function alternating_post_class($classes) {
  static $counter = 1;
  switch ($counter) {
    case 1:
      $classes[] = 'full-width';
      break;
    case 2:
    case 3;
      $classes[] = 'half-width';
      break;
  }
  $counter = ($counter == 3) ? 1 : $counter + 1;
  return $classes;
}
add_filter('post_class', 'alternating_post_class');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)