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 |
Hello Juggledad and Flyn, please help.
I have look for magazine theme anywhere, I saw in this Atahualpa is discussed. I have tried to use the code attached to make in to 2-3 column. Loop is worked, but it's repeated continuously after the end of post count. How can I limit the post displayed? Thanks for help. www.darmanpurba.com |
Hi. I've successfully used the suggested technique and created a building directory page for my client's site. I created each tenant entry in a blog post and they show on the directory page. In wp settings, i made the directory the posts front page. i've looked through the code and alahualpa settings and i need help with some things.
1 the two columns are not even; the right column is narrow. where can i control the width of the components of this dynamically built page? 2 the headings for each entry are hot; i'd like them to just be displayed. can i turn off the link characteristics? 3 i'd like to build a template for the tenant directory blog posts so it's easy to add more entries and to make all the entries consistent (i'm having difficulty lining everything up). it's not clear to me how to do that. is it possible? 4 each tenant post is categorized by its floor number. i want to show the floor category menu on the business directory page only and have the two column display of those businesses on the floor when the category is clicked. will the home.php file control that too? here's the url: http://7pineplaza.com/wordpress/directory/ thank you so much for your help! regards mike edit: for number 3, above, i'm creating posts with tables to keep things aligned. how can i build a template so my client can add a new tenant after i turn the solution over to her? i've address #4 with the inner sidebar holding the categories. |
the two columns are the same size when I look at them (Safari on a Mac)
|
thanks for your reply. even if they are the same, which css or php file controls the column widths?
|
Similar issues as mnl.
Atahualpa 3.4.6, WP 2.9.2 After following the instructions to get two columns (using the first set of instructions posted by Flyn on this thread) it seems that on the home page the column width does not remain within the center column, and the excerpts are not recognised (texts are shown in full and thumbnails don't appear) On the second page of posts things appear as I expected them to. http://www.susanne.treacletheatre.co...press/?paged=2 http://www.susanne.treacletheatre.co.uk/wordpress/ (ignore content, I'm just playing with old posts from my other site to get an initial layout sorted) Thanks, Kaspar Current index: PHP Code:
|
try this, add this to ATO->Add HTML/CSS Inserts->CSS Inserts
HTML Code:
.column {width: 50%;} |
Hiya,
I gave it a go but no luck. It does help, but only on the 2nd page of posts, where the columns now expand in equal proportions. So a big thank-you there. But on the home page still no change. All these ATO parameters seem to be bypassed, what with all the lack of excerpts or thumbnails too. |
hi. i have just one more problem that i don't know how to address: i used the two column solution to make the building directory. it looks very cool! each entry is a post (the rest of the site are pages) and i categorize them by floor.
http://7pineplaza.com/wordpress/directory/ i want to turn the site on and give it to the client so she can update the tenants as necessary. i need to be able to order the posts, either alpha by title or by suite number. how can i do that, please? |
Quote:
My goal is to get 3 columns for posts at the homepage, but due to the troubles I'm starting with two just to see how that goes. Currently I'm still using Atahualpa version 3.4.9 at http://wp.beauty.nu Many thanks in advance! |
not that this will fix your problem, but upgrade to 3.5.1
|
Just because I've gone away for a while doesn't mean I'm still struggling with this issue! Interesting that other people are experiencing the same problem.
|
I have a question that a few others have asked but not had answered yet. My current layout is that I have the most recent post showing as the full post and the rest showing as excerpts. I want to be able to have the most recent post show normally, with the excerpts showing in 2 columns. Is this possible? The site in question is http://solarlightssite.com/.
*edit - Just to clarify, I would like the two columns to be for all of the pages that have excerpts, like the tags and cat pages, etc., NOT on single post pages. |
reaus you seem to have achieved the two column solution on your home page. How did you solve the problem (I assume it is still the A theme)? Any help greatly appreciated.
K |
@ kaspar.wimberley I figured that it might help to change the width of the center column(style & edit center column)....and to my surprise it actually worked :p
As simple as that haha! Never thought of it before though :o |
I managed to get my posts to show into two columns, but when I go to a single post it stills show in the same width as on the home/cat page. Is it possible to edit this width?
+ Since I've changed my lay-out into 2 columns the website is messed up in IE, does anyone know how to fix this? Thanks so much in advance! ATA theme is the best :) http://wp.beauty.nu/ ATA version 3.5.1 |
All times are GMT -6. The time now is 04:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.