• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Even / Odd Post Styling

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Even / Odd Post Styling

This topic is: resolved

Tagged: even, odd, post styling

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 6 months ago by Dhishna.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 22, 2015 at 12:40 pm #174575
    jackirt
    Member

    I'm looking to style my posts like what is displayed in this site:

    Home

    Can any of you point me in the right direction?
    I've enabled even/odd posts by placing this in my functions.php file:

    //* Add odd/even post class
    function sample_oddeven_post_class ( $classes ) {
    global $current_class;
    $classes[] = $current_class;
    $current_class = ($current_class == 'odd') ? 'even' : 'odd';
    return $classes;
    }
    add_filter ( 'post_class' , 'sample_oddeven_post_class' );
    global $current_class;
    $current_class = 'odd';

    , but that's as far as I've gotten. My site is running on localhost, so I unfortunately can't give my site url.

    Thanks for you help!

    December 23, 2015 at 6:12 am #174618
    Dhishna
    Member

    I think this post might help.


    Recommended WordPress Themes & Plugins, Genesis Development

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble