|
#1

Apr 16, 2009, 08:44 AM
|
|
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?
|
#2

Apr 16, 2009, 06:10 PM
|
 |
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Read the bottom of this post first on how to apply this to only the homepage
In index.php replace
PHP Code:
<?php // The LOOP. Do this for all posts: while (have_posts()) : the_post(); $postcount++; ?>
(or similar, I am already in 3.3.3)
with
PHP Code:
<table cellpadding="0" cellspacing="0" border="0"> <?php $column = 1; ?> <?php // The LOOP. Do this for all posts: while (have_posts()) : the_post(); $postcount++; ?>
<?php if ($column == 1) echo "<tr>"; ?>
<td class="column<?php echo $col;?>" style="vertical-align: top">
and still in index.php replace
PHP Code:
<?php // END of the LOOP endwhile; ?>
with
PHP Code:
</td> <?php if ($column == 2) echo "</tr>"; (($column==1) ? $column=2 : $column=1); ?> <?php // END of the LOOP endwhile; ?> </table>
And at Theme Options -> Posts or Excerpts
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"
|
#4

Oct 26, 2009, 06:39 PM
|
|
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'.
|
#5

Jan 7, 2010, 06:48 PM
|
|
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!
|
#6

Jan 8, 2010, 07:32 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7

Dec 23, 2010, 01:59 AM
|
|
Quote:
Originally Posted by redbiker
|
@Redbiker: If you have implemented the code given in mentioned site, would you be kind enough to share step by step instructions for atahualpa users.
thanks in anticipation.
|
#8

Jan 21, 2010, 01:08 PM
|
|
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.
|
#9

Jan 29, 2010, 11:05 AM
|
|
How do you make three columns?
|
#10

Jan 29, 2010, 05:06 PM
|
|
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!
|
#11

Feb 7, 2010, 06:01 AM
|
|
|
#12

Feb 8, 2010, 10:25 AM
|
|
Hi Sachein,
Thank for so much for finding that post. I will try it and see how it works.
Thanks again!
|
#13

Feb 19, 2010, 11:08 AM
|
|
Quote:
Originally Posted by Sachein
|
Thank you, Sachein! I followed the article and it worked perfect!
|
#14

Dec 14, 2010, 07:49 AM
|
 |
|
|
16 posts · Apr 2010
France
|
|
Quote:
Originally Posted by Sachein
|
I am trying desperately to insert the code. Could you please let me know where to insert it?
code from : http://wordpress.org/support/topic/p...umns?replies=7
Is it in "The Loop" of center column?
or
in the editor?
Thanks a lot for your help
|
#15

Jun 25, 2010, 02:01 AM
|
 |
|
|
7 posts · Jun 2010
Marin County, CA>
|
|
So I did this:
www.prthatroxxx.com
but I cant get the 2 columns to go back to excerpts, they remain full post, and I have all set the settings to excerpts. ? This is perfect theme for my client! He will donate _something_ I just gotta show some results.
I need two columns separable by two categories, which I think I have already done... but cant get posts to go back to excerpts.
|
#16

Jun 30, 2010, 05:00 PM
|
 |
|
|
7 posts · Jun 2010
Marin County, CA>
|
|
Juggledad thanks for the help on the browser mishap! Flynn's Oct 2008 Post on making 2 columns worked perfectly for me so far. Any pointers on getting the posts to be assignable in one of only two category's and down the page not across?
See:
www.prthatroxxx.com
I want one column of press releases and one column of press coverage, cat 1 and cat 2. Appreciate any help! I am intermediate .php .css .html guy.
|
#17

Jun 30, 2010, 05:50 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
well I just published a page templete in the Gold Forum Tutorials, that lets you put a custom query on the page. That might help you out, you could specify the query to be only those two categories.
As for going down the page vers aross, that would envolve a bit of coding since you would have to fires find out how many posts allowed on the page, then read all the posts to find out how many there are (assuming that you want the two columns to be balanced) they you would need two queries, one for the left colum and one from teh right - the right one starting at the half way point of the total posts. Then you could code the html to display the posts.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Jul 9, 2010 at 04:53 AM.
|
#18

Jul 8, 2010, 09:52 AM
|
|
Still not getting an answer.  Is it possible to have the most recent post as a full post showing up normally and have the excerpts show up in columns?
|
#19

Jul 8, 2010, 07:08 PM
|
 |
|
|
7 posts · Jun 2010
Marin County, CA>
|
|
Hi Juggledad ! 5thbeatle here ... thanks I had my client donate $20 and as we move forward we can do more. I will be diving into your post in the Gold Forum soon when a get break to work on this site again. Cheers!
|
#20

Jul 9, 2010, 04:55 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
to everyone asking the question
Quote:
Is it possible to have the most recent post as a full post showing up normally and have the excerpts show up in columns?
|
the answer is probably. You will have to change the code so that the first query returned create a table column that spans the two rows in the table.
If I get time (paying customers, my volunteer work, house chores all come first) I may take a look at this and figure out exactly what coding changes are needed and put it into a template.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Jul 9, 2010 at 04:59 AM.
|
#21

Jul 30, 2010, 02:17 AM
|
|
Quote:
Originally Posted by Flynn
Read the bottom of this post first on how to apply this to only the homepage
In index.php replace
PHP Code:
<?php // The LOOP. Do this for all posts: while (have_posts()) : the_post(); $postcount++; ?>
(or similar, I am already in 3.3.3)
with
[php] <table cellpadding="0" cellspacing="0" border="0">
<?php $column = 1; ?>
<?php // The LOOP. Do this for all posts:
while (have_posts()) : the_post(); $postcount++; ?>
...
|
Hi, Flynn. My problem is exactly the same like MNL's one.
I did everything here, plus I put everywhere in Configure Excerpt page "only excerpts", , in the "Show the first X posts on HOME page as full posts?" I set "0", but on my first page you could see the all full posts, not the excerpts.
Can you help me resolve this problem? Thanks in advance.
I'm in WP 3, Atahualpa 3.5.3
btw, here is the site: http://shadowdance.comeze.com/
Last edited by Volhova; Jul 30, 2010 at 02:26 AM.
|
#22

Jul 30, 2010, 03:50 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
see HOWTO: "JUGGLEDAD's two columm posts" PAGE template with posts above the columns ( http://forum.bytesforall.com/showthr...6616#post36616) in the gold forums Tutorials
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#23

Jul 30, 2010, 03:55 AM
|
|
Thanks, but I haven't permission to access that page.  That's why I'm asking here.
|
#24

Jul 30, 2010, 04:07 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
sorry, the gold forums are available to members that have made a $20 or more donation.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#25

Aug 19, 2010, 01:48 PM
|
|
Dear Friends,
I am producing a new site using the Atahualpa 3.5.3, used the tip of Flynn ( http://forum.bytesforall.com/showthread.php?t=1288) to make it with two columns and would like to know how to put two independent loops, showing the two most recent posts, each a separate category.
Ex: Four posts on the main page, two of a category with different design and two of another.
Thanks.
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Hybrid Mode
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
How do I create a Home Page with Posts in it?
|
wdycus |
Post-Kicker, -Byline & -Footer |
5 |
Aug 31, 2010 06:48 AM |
[SOLVED] Blog Page causes Home Page Tab to light up as well
|
WebWeaver |
Header configuration & styling |
1 |
Jun 30, 2009 06:45 PM |
Disply posts in all three columns-- plus, ideally, a widget or two, too?
|
petevannuys |
Sidebars & Widgets |
2 |
Jun 11, 2009 06:51 PM |
recent posts in the right sidebar, but not on the home page
|
ind |
Sidebars & Widgets |
1 |
May 6, 2009 03:49 AM |
Limit the number of Posts on Home Page
|
coaxkid |
Post-Kicker, -Byline & -Footer |
4 |
Apr 12, 2009 06:01 PM |
|