1/* Use an array to add multiple classes in post_class() function: */
2<?php
3$classes = array(
4 'class1',
5 'class2',
6 'class3',
7);
8?>
9
10<div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
11
1/* A simple way to add multiple classes to the post_class defaults, is to just write them as a string argument: */
2
3<div <?php post_class( 'class1 class2 class3' ); ?>>
4
1/* we see in php code */
2<div id="post-<?php the_ID(); ?>" <?php post_class( 'class-name' ); ?>>
3
4/* we see in html code like this */
5<div id="post-4564" class="class-name post-4564 post type-post status-publish format-standard hentry category-news">
6