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)

jmc44 May 10, 2011 09:12 AM

Quote:

Originally Posted by juggledad (Post 65107)
Things are a little different in 3.6.x did you follow the original instructions or the info from this

I believe I probably followed the original instructions - please can you repost that link - it's incomplete and giving me a 404 error.

thanks

PS: I did try to achieve the same thing with your template, but receive an error message on that too - could you tell me which would be the most correct way, knowing that I need the homepage and category lists to display in 2 columns if possible...

lmilesw May 10, 2011 10:21 AM

I fixed the link.

jmc44 May 11, 2011 02:22 AM

Thanks Larry,
now the link works I realise that I have already been to that post - and am working thru the error msg I received :)

juggledad May 12, 2011 05:50 AM

1) did you create a home.php which was a copy of the template?
2) did you edit the home.php and change the '$posts_above_the_column = 0;' to the value you want?
3) comment out the next two lines - change them from
HTML Code:

        foreach ( $my_custom_field as $key => $value )
                if ($key == 'posts_above_the_column') {$posts_above_the_column = $value;}

to
HTML Code:

//        foreach ( $my_custom_field as $key => $value )
//                if ($key == 'posts_above_the_column') {$posts_above_the_column = $value;}

4) at 'dashboard->settings->reading->Front page displays' set it to 'Your latest posts'
test it

jmc44 May 15, 2011 11:43 AM

Ahhh - it seems that I missed the 'comment out the two lines...'

it's working now - many thanks

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 12:44 PM.

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