Page 1 of 1

Trying to make Wordpress have two columns side by side

Posted: Thu Sep 11, 2008 3:55 pm
by tarahmarie
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/0 ... 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:

Code: Select all

 
<?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;
?>
 
And here's the error I'm getting: Parse error: syntax error, unexpected T_CLASS in /var/www/blog/wordpress/index.php on line 19

Googling ain't helping no more.

Thanks!

Re: Trying to make Wordpress have two columns side by side

Posted: Fri Sep 12, 2008 1:34 am
by tarahmarie
I've never posted here before; am I posting my code correctly?

Re: Trying to make Wordpress have two columns side by side

Posted: Sat Sep 13, 2008 1:57 am
by tarahmarie
Hey, all:

If I'm not posting my code or question correctly, can you please tell me so I can fix it?