Support » Themes and Templates » [Theme: Twentyten] two column (like Magazine)

  • I would like to slightly redo the theme TwentyTen. I would like to display the first two posts in two columns (as is the theme magazine). Now I did it statically in index.php pasted data – example:
    I would like to do this automatically.

    Perhaps i need to do it in loop.

    <table><tr><td width=”50%”>

    TITLE post1
    excerpt post1

    <td width=”50%”>

    TITLE post2
    excerpt post2


    I thought in the following way, but I do not know how to determine the post1 and post2, and the rest of the posts should be displayed normally below one by one

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi


    Forum Moderator

    Do not edit the Twenty Ten theme itself. First create a child theme for your changes.

    You don’t have to make a change in index.php, you can do it with CSS.

    As esmi noted, don’t modify the theme files directly, but use a child theme, or use a CSS plugin since TwentyTen doesn’t support custom CSS.

    Then add this CSS to either the end of your child theme’s style.css file, or to your CSS plugin’s Custom CSS option:

    #content > .post:nth-child(1),
    #content > .post:nth-child(2) {
    	width: 45%;
    	display: inline-block;
    #content > .post:nth-child(2) {
    	margin-left:	9%;

    What this will do is set the widths of your first two posts to 45% of their container’s width, then set a margin between them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Twentyten] two column (like Magazine)’ is closed to new replies.