• I have tried adding Odd/Even classes after posts to serve the CSS but with posts using Content Views I don’t know how to do it. Help me. Thank!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hello,
    You might try these CSS:

    
    .pt-cv-content-item:nth-child(odd) {
    }
    
    .pt-cv-content-item:nth-child(even) {
    }
    

    Best regards,

    Thread Starter vanminh888

    (@vanminh888)

    Thanks for your feedback. However I try with the above but it doesn’t work for me. In my case change the title color with post odd, even. Hence I added the class behind that and used css for it.

    function cvp_theme_field_title_class( $args ) {
       global $current_class;
       $current_class = ($current_class == 'odd') ? 'even' : 'odd';
       $args .= ' ' . $current_class;
       return $args;
    }
    add_filter( 'pt_cv_field_title_class', 'cvp_theme_field_title_class', 100, 1 );

    Best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add Odd Even class after posts’ is closed to new replies.