I want to create two columns for the frontpage (index file). It would be similar to a magazine style.
In other words, I want to have two posts right next to each other.
Could someone please help me with the code?
I want to create two columns for the frontpage (index file). It would be similar to a magazine style.
In other words, I want to have two posts right next to each other.
Could someone please help me with the code?
There are many ways to achieve that.
this simple CSS aproach whould work:
Add this logic to your markup:
´<div id="postContainer">
<div class="myPost"> your post #1 here </div>
<div class="myPost"> your post #2 here </div>
<div class="myPost"> your post #3 here </div>
<div class="myPost"> your post #4 here </div>
</div>´
Then add this to your CSS:
´#postContainer {
width:600px;
}
.myPost {
width:290px;
float:left;
margin: 0 5px;
}´
MAC :)
Thanks for your reply. But how can I add the Posts titles automatically?
I call my post tile with:
<h1>" rel="bookmark"><?php the_title(); ?></h1>
If I put --> <
div class="myPost"><h1>" rel="bookmark"><?php the_title(); ?></h1></div>
It works for this part, but I want the next posts automatically added to the site. Do you know the correct code to achieve this?
I figured it out, thanks!!!
cool :)
caflma
i loved your idea but i couldn't make it auto as you wanted .
tried more than twice so i figured out im not and i won't be a programmer
newbie at websitemaster and wordpress .
so i hope you can share how did you solve your problems
if you didn't pay anything for it :)
thanx in advance
This topic has been closed to new replies.