![]() |
2 columns for posts on blog home page?
I'm new to Wordpress/php so please be gentle with me.
How can I edit the index.php file (assuming that's what I need to do) so that when the homepage is displayed posts are shown in 2 even columns rather than the standard single column? |
Read the bottom of this post first on how to apply this to only the homepage
In index.php replace PHP Code:
with PHP Code:
PHP Code:
PHP Code:
choose "Only Excerpts" everywhere Or, to limit this to the homepage make a copy of index.php as home.php, apply the above edits in home.php instead of index.php and upload home.php to the theme's directory /wp-content/themes/atahualpa332/, and set Theme Options -> Posts or Excerpts -> Posts or excerpts on HOME page? to "Only Excerpts" |
Thanks Flynn. I found a slightly different way of doing it on my own in the end.
I've added a home.php file to the theme then found a neat way of doing a two column layout here... http://perishablepress.com/press/200...ss-post-order/ |
Atahualpa is quite a theme. Even more impressive is the forum.
I've spent hours looking for custom themes, magazine style stuff. Most solutions either don't offer enough features or don't offer enough customization. The trade-off was always unsatisfying. Fortunately, the forums are very thorough, best I've seen. And, so, I found this post which answered my question exactly. Can't thank you guys enough. Oh, wait, I can. I will click 'Donate'. |
Hi Flynn,
Forgive me I'm new and don't know about coding. Could you show me how to make it into 3 columns instead for 2? Is it even possible? I'm using Atahualpa 3.4.4 already. Thank you so much! |
You can easily set the theme to use 1, 2, 3, 4 or 5 columns: two sidebars on eithor side and the center column. To set the sidebars to use, go to ATO->Style & configure SIDEBARS and take a look at the optins.
|
Thanks for your help juggledad. But what I want to do is for the center column to show all the posts in 3 columns instead of the 1 by default. It's the same intention as the original poster, who wanted 2 columns. The code that Flynn provided works perfect when i tried it with my blog. However, I want to know how to modify that code so that instead of 2 columns of posts, it shows 3.
|
Hello ladies and gents.
Using the code provided by Flynn, I managed to have the center page split into 2, thanks for that! Now, to make things a bit more complicated, how can I post certain categories only to the left side, and another different category to the right? As some of the readers, my awareness about PHP is almost nil. Thank you! Adriano |
Hi Flynn, thank you very much for this table. I just have one problem, how do I remove gaps. Below is an image of what I am talking about.
http://www.tamileelamonline.com/wp-c...loads/gaps.png |
How do you make three columns?
|
Please, I've been trying to figure the same thing out, but no luck. Flynn, please help us out when you get a chance. I know you are busy with the ThemeFrame, which is coming out awesome with Beta 5.
Thank you in advance! |
|
Hi Sachein,
Thank for so much for finding that post. I will try it and see how it works. Thanks again! |
Hi there!
I've tried the code that Flynn provided and although it does split the center into two column, I was wondering if there was a way to divide only the excerpt posts into 2 columns. For example post 1 to post 3 are full pages, while the rest of the posts are excerpts divided into two columns. My coding skills are pretty limited but I have tried changing the index.php file with no results. |
Quote:
|
How would you do this for a static site (not a blog) to format particular pages? What if I want three columns on one page, two on another, one on another? Is there a way?
|
use HTML in the page to build a table with the number of columns you want then add your data to a cell in each column
|
That's a nice idea.
Do you think it would be possible to display the first post as usual, then below this post, display a table with 2 columns with their own styles, from post 2 to post XX...? |
These articles would be helpful to create multiple loops and columns:
http://perishablepress.com/press/200...ith-wordpress/ http://perishablepress.com/press/200...ss-post-order/ |
Hey all,
Is it possible to use this code but only apply it to my archive pages? **edit: found what I wanted with the search function :D |
Hi again,
I managed to display the home page with two columns, thanks to this guide and to some modifications. I have the same problem than Sachein, ie some of my cells have a gap I can't remove (please see : http://www.lebardessciences.com ) I tried the method he gave but with no success. What am I missing? Here is the code I use to display the columns: HTML Code:
<table class="table_central"> |
Your problem is not with the code, it's the amount of copy in the cell varies so the cells are of different size. If you notice, the top of each cell lines up, it's the bottom that gives you the issue
thid idn't s perfect solution but it msy be enough. set the container color to white (#ffffff) then change your CSS Insert for HTML Code:
.table_central { HTML Code:
.table_central td.column { |
Thanks a lot. I managed to remove those gaps. How is it that even with cellpadding and cellspacing set to 0, I cannot remove the small space between the cells? My idea was to remove the vertical space between two cells and display the side borders of the cells to have a vertical separation betwwen two cells.
|
I have the columns working perfectly. Thanks for all.
Now, there are an option to have the last post in one column, and the rest in two? So always the last will be prominent. Thanks |
can we made a frontpage like this?
1 2 - 3 4 - 5 6 - 7 i mean, the latest post in one row and the others in two rows. thanks for your time |
All times are GMT -6. The time now is 11:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.