Jump to content

Trying to make Wordpress have two columns side by side


tarahmarie

Recommended Posts

Hi, all:

 

I'm a decent Java coder and baby *NIX user setting up my first LAMP stack (dang! This LAMP thing is UNBELIEVABLY easy in Kubuntu!! I've already got a site up and running after only a few hours!). I've gone through a few of the PHP tutorials here, and searched for this topic, but haven't had any luck finding help, or getting my index.php file to straighten up and fly right. Here's the tutorial I have been trying to use to set up my Wordpress blog to have two columns (so I and my friend can each have a column with separate comments, RSS feed, etc):

 

http://www.cre8d-design.com/blog/2008/03/01/how-to-organize-posts-into-two-side-by-side-columns-in-wordpress

 

I'm trying to edit my index.php file to do what this tutorial says, but I'm getting errors. Here's my code:

 

#  
# <?php
# $col = 1;
# if ($col == 1) echo "<div class=\"row\">";
# /**
#  * Front to the WordPress application. This file doesn't do anything, but loads
#  * wp-blog-header.php which does and tells WordPress to load the theme.
#  *
#  * @package WordPress
#  */
#  
# /**
#  * Tells WordPress to load the WordPress theme and output it.
#  *
#  * @var bool
#  */
# define('WP_USE_THEMES', true);
#  
# /** Loads the WordPress Environment and Template */
# div class="post col<?php echo $col;?>" id="post-<?php the_ID(); ?>" //apparently the error is here...
# require('./wp-blog-header.php');
# if ($col == 1) echo "</div>"; (($col==1) ? $col=2 : $col=1); endwhile;
# ?>

Link to comment
Share on other sites

there is an alternative way to do it involving sidebars. I have used it to changes my blog templates slightly.

Have a google for adding sidebars for the time being as I have to go out now and can't post how to do it myself. I will get back on here when I'm back though and help you through it.

 

the sidebars can be used as columns so long as you call them correctly!

 

 

 

Link to comment
Share on other sites

There's posts out there that explain how to do two columns, but they all require more editing of the php; I still don't quite understand how to do it.  The places I go that describe how to set up two columns all reference the same post that had the cold I'm having trouble with already, like this one:  http://wordpressgarage.com/code-snippets/publishing-wordpress-posts-in-two-columns/

Link to comment
Share on other sites

hello again!

 

i'm back now...charity golf day was calling!

 

here is the feed to the thread on the wordpress forums where i learned how to add an extra sidebar in

http://wordpress.org/support/rss/topic/186583

 

you can also try this however:

http://www.glish.com/css/home.asp

 

i hope those are of use.

 

remember, you will need to manipulate the code a little to get the sidebars that you create to show side by side as you described, but this technique will work

 

sam

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.