user1095573
user1095573

Reputation: 33

Wordpress Posts in different Columns

Usually I try to figure out things myself, but I'm stuck here and couldn't find a solution for this on the Internet. I try to figure out/know if there is a possibility to have an option in wordpress in which column I want a post ( it's thumbnail ) to be posted in. Let's say I have 5 Columns on the Index site, and I want certain posts only to be posted in Column 1.

The reason I try to do this is to have an more fluent look of the thumbnails. I know Isotope would be an option but since I have fixed widths which causes the order of the thumbnails to be mixed up, I tried to find a different solution.

Upvotes: 0

Views: 113

Answers (1)

scottoliver
scottoliver

Reputation: 536

You have a couple of options.

  1. Two loops. The first loop would populate column 1, and the second would populate elsewhere.

  2. If the columns are populated sequentially, you possibly could populate column 1 and then column 2 in the same loop.

    while (have_posts()) : the_post();
        $column1 = 0
        if ($column1 < 2) {
           //code to populate column 1
        }
        else
           //code to populate column 2
        }
    endwhile
    

Upvotes: 1

Related Questions