WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to add one more column in grid style ? (4 posts)

  1. mayur6578
    Member
    Posted 1 year ago #

    "themesbag.com" currentyly under construction is my themes blog and this is the theme i am using for it.
    I was just curious to know if i can add one more column to it, i tried doing it myself but i can't figure it out.
    So any help would be appreciated.

    Thank you!

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    every second post seems to get .first-in-row css class;

    you need to find and change that code; in the loop of the front page template (index.php).

    in index.php, this section generates this extra css class for post_class():

    if($first) $class = "first-in-row";
    		else $class="";
    		$first = !$first;

    change it to:

    $class = ($wp_query->current_post%3 == 0) ? "first-in-row" : "";

    (untested)

  3. mayur6578
    Member
    Posted 1 year ago #

    woohooo......(screenshot)
    Thank you very much sir...you are wonderful!
    [if there is anything i can do please let me know]

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Good work Mayur6578 and Alchymyth.

Topic Closed

This topic has been closed to new replies.

About this Topic