• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Style Every 2nd Post Differently Using Odd Even Classes

This code enables you to add the same class to every odd number of posts and another class to every even numbered post, on any type of archive.

The code also works in any theme.

You can use the code on your:

  • front page
  • home page
  • blog page
  • taxonomy or term archive
  • or any type of archive page including category, tag, date, author and custom post type archives

The code also enables you to control which pages the classes are added to for paginated archive pages. This means you can use the code to add classes only on the first, second and/or third page etc of any type of archive page.

Here’s the code for logged in members:

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags