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

Appfinite

Premium WordPress Themes for The Genesis Framework

  • Themes
  • Blog
  • Tutorials and Resources
  • Forums
  • Contact Us

Most recent posts on home page

Home › Community Forums › Epik Theme Support › Most recent posts on home page

  • This topic has 1 reply, 1 voice, and was last updated 9 years, 9 months ago by ellaj.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 13, 2013 at 2:58 pm #4672
    ellaj
    Customer

    Hi,
    Is there a way to make the most recent posts show up on the home page in a three column format?
    Thank you.

    May 13, 2013 at 11:12 pm #4674
    ellaj
    Customer

    I found this tutorial, http://www.billerickson.net/a-better-and-easier-grid-loop/, but I’m not sure how to change it so the three columns are only on the home page.

    /**
    * Archive Post Class
    * @since 1.0.0
    *
    * Breaks the posts into three columns
    * @link http://www.billerickson.net/code/grid-loop-using-post-class
    *
    * @param array $classes
    * @return array
    */
    function be_archive_post_class( $classes ) {

    // Don’t run on single posts or pages
    if( is_singular )
    return $classes;

    $classes[] = ‘one-third home’;
    global $wp_query;
    if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 )
    $classes[] = ‘first’;
    return $classes;
    }
    add_filter( ‘post_class’, ‘be_archive_post_class’ );

    Any help would be much appreciated.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

Primary Sidebar

Search Forums

Affiliate Program

Looking to earn some money? Join our Affiliate program and earn 35% of every sale you refer. Top referrers earn 40-50%.

Join Now →

The Genesis Framework

All of our themes are designed for the Genesis Framework. You will need to purchase Genesis in order to use any of our themes.

Purchase Genesis

Hire a Web Developer

Need help setting up or customizing your website?

Contact Us →

Search Full Site

  • Buy Genesis!
  • Shopping Cart
  • Themes
  • My Account
  • Support Forums
  • Tutorials and Resources
  • Privacy Policy
  • Contact Us
  • Follow Us on Twitter

Copyright © 2023 · Appfinite · Built With The Genesis Framework