durannarud
Member
Posted 1 year ago #
Hi, I'm trying to modify the twentyeleven theme in order to display 2 post excerpts per row, rather than the original 1 per row, in the category pages.
I made myself a design that supports smaller excerpts, but I don't know how to tell it to put 2 posts side by side and then continue on the next row. This, basically: http://puu.sh/tQcA
Any help appreciated. Thanks!
Basically, you need to create two post divs, set the widths so they both fit inside the enclosing element -- and use the float property in CSS to float one to the left and one to the right. You'll have to do some editing of the template php file and the style.css file to make it work. It's the same concept that creates a sidebar and a main content section on a typical two-column page.
BE VERY SURE you are using a Child Theme -- do not modify the default WP theme.
durannarud
Member
Posted 1 year ago #
Thanks. I did do the CSS already, as you can see in the linked image. What I don't understand is how to make WordPress feed the excerpts into those floated divs. What's the code to tell it to feed 1 article on the left and 1 article on the right, instead of feeding everything into divs stacked in a column, like it does in the original theme?