tarahmarie Posted September 13, 2008 Share Posted September 13, 2008 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; # ?> Quote Link to comment https://forums.phpfreaks.com/topic/124038-trying-to-make-wordpress-have-two-columns-side-by-side/ Share on other sites More sharing options...
sam_h Posted September 13, 2008 Share Posted September 13, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/124038-trying-to-make-wordpress-have-two-columns-side-by-side/#findComment-640376 Share on other sites More sharing options...
tarahmarie Posted September 13, 2008 Author Share Posted September 13, 2008 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/ Quote Link to comment https://forums.phpfreaks.com/topic/124038-trying-to-make-wordpress-have-two-columns-side-by-side/#findComment-640640 Share on other sites More sharing options...
sam_h Posted September 13, 2008 Share Posted September 13, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124038-trying-to-make-wordpress-have-two-columns-side-by-side/#findComment-640783 Share on other sites More sharing options...
taichimasta Posted September 17, 2008 Share Posted September 17, 2008 wordpress i've actually recently worked on , a site for my friend using wp. anyways try loading the file (wp-load.php) and see if that fix's the error. Quote Link to comment https://forums.phpfreaks.com/topic/124038-trying-to-make-wordpress-have-two-columns-side-by-side/#findComment-644194 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.