Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

2 columns for posts on blog home page?


  #1  
Old Apr 16, 2009, 08:44 AM
redbiker
 
2 posts · Apr 2009
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  
Old Apr 16, 2009, 06:10 PM
Flynn's Avatar
Flynn
 
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=$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"
  #3  
Old Apr 17, 2009, 02:59 AM
redbiker
 
2 posts · Apr 2009
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/
  #4  
Old Oct 26, 2009, 06:39 PM
deanshultz
 
2 posts · Oct 2009
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  
Old Jan 7, 2010, 06:48 PM
marcelo
 
12 posts · Dec 2009
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  
Old Jan 8, 2010, 07:32 AM
juggledad's Avatar
juggledad
 
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  
Old Dec 23, 2010, 01:59 AM
mathur.rajeev
 
6 posts · Nov 2010
Quote:
Originally Posted by redbiker
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/
@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  
Old Jan 21, 2010, 01:08 PM
Sachein
 
3 posts · Jan 2010
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  
Old Jan 29, 2010, 11:05 AM
Sachein
 
3 posts · Jan 2010
How do you make three columns?
  #10  
Old Jan 29, 2010, 05:06 PM
marcelo
 
12 posts · Dec 2009
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  
Old Feb 7, 2010, 06:01 AM
Sachein
 
3 posts · Jan 2010
Hi Marcelo,

Here is the link: http://wordpress.org/support/topic/358182?replies=7
  #12  
Old Feb 8, 2010, 10:25 AM
marcelo
 
12 posts · Dec 2009
Hi Sachein,

Thank for so much for finding that post. I will try it and see how it works.
Thanks again!
  #13  
Old Feb 19, 2010, 11:08 AM
marcelo
 
12 posts · Dec 2009
Quote:
Originally Posted by Sachein
Thank you, Sachein! I followed the article and it worked perfect!
  #14  
Old Dec 14, 2010, 07:49 AM
bender57's Avatar
bender57
 
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  
Old Jun 25, 2010, 02:01 AM
5thbeatle's Avatar
5thbeatle
 
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  
Old Jun 30, 2010, 05:00 PM
5thbeatle's Avatar
5thbeatle
 
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  
Old Jun 30, 2010, 05:50 PM
juggledad's Avatar
juggledad
 
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  
Old Jul 8, 2010, 09:52 AM
SJSchafer
 
21 posts · Jun 2010
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  
Old Jul 8, 2010, 07:08 PM
5thbeatle's Avatar
5thbeatle
 
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  
Old Jul 9, 2010, 04:55 AM
juggledad's Avatar
juggledad
 
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  
Old Jul 30, 2010, 02:17 AM
Volhova
 
7 posts · Jul 2010
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  
Old Jul 30, 2010, 03:50 AM
juggledad's Avatar
juggledad
 
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  
Old Jul 30, 2010, 03:55 AM
Volhova
 
7 posts · Jul 2010
Thanks, but I haven't permission to access that page. That's why I'm asking here.
  #24  
Old Jul 30, 2010, 04:07 AM
juggledad's Avatar
juggledad
 
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  
Old Aug 19, 2010, 01:48 PM
edyrio's Avatar
edyrio
 
4 posts · Feb 2009
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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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


All times are GMT -6. The time now is 04:33 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.