Marc Germain
asked 9 years ago


I would like the fist post to be automaticallt ”double”.

How I can acheive this.

1 Answers
answered 9 years ago

To make the fist post to be auto call "double", you can add the following code to the function.php file:

add_filter( 'post_class', 'wps_first_post_class' );
function wps_first_post_class( $classes ) {
    global $wp_query;
    if( 0 == $wp_query->current_post )
        $classes[] = 'grid-double';
        return $classes;

Hope this helps !

Powered by DW Question & Answer Pro