Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   2 columns for posts on blog home page? (http://forum.bytesforall.com/showthread.php?t=1288)

thekjub9 May 25, 2011 04:51 PM

Quote:

Originally Posted by Flynn (Post 5096)
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"


is this still possible in 3.6.7 ? with making home.php and edit the code there ? so when new version comes home.php will stay ?

juggledad May 25, 2011 06:12 PM

There is a thread in the Gold Forums tutorials showing how to do this


All times are GMT -6. The time now is 07:30 AM.

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