• Hello all.
    I am porting an HTML website (http://postream.com) to a WordPress site (http://humantail.com/log).

    I want to create a second column in WordPress that allows different content per page. Currently I’m using a Text widget, but that’s static. I’d be happy assigning categories or starting with a new theme, but don’t want to do it in CSS (like a right floating <div>) because my users wouldn’t be able to edit the column in the WYSIWYG editor.

    I’ve looked at the other topics covering two columns of text, but not seen an answer. Any help or recommendations much welcome.

    Thanks all

    Tom

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tom,

    Personally, I’d absolutely use CSS to create the second column as the alternative is, well, tables and, to me that’s just no good, unless it’s tabular data you’re displaying.

    I’m sure there are others out there with way more experience than I when it comes to this, but I’ve attacked this problem in a few ways:

    1. Use Custom Fields for your content and in the sidebar template use some php to call the contents of the custom field if it exists.
    2. Create a ‘page’ that’s dynamically ‘pulled’ into the sidebar using some custom php code
    3. If the users really aren’t going to edit the sidebar, you could create separate sidebars called via includes, or change the content based on Conditional Tags

    Examples:

    #1 assumes I’ve added a custom field to some pages titled aside-text and typed whatever content in that I want for the value of that field.

    It checks the custom field for that page and, if there’s a field called aside-text, it’ll print out the contents of it’s associated value field.

    I’ve used this with images as well.

    <div id=”content-aside”>
    <?php if(get_post_meta($post->ID, “aside-text”, true)): ?>

    <?php $key=”aside-text”; echo get_post_meta($post->ID, $key, true); ?>

    <?php endif; ?>
    </div>

    #2 assumes I’ve created a page named ‘About’ and am dynamically ‘pulling’ it into another part of a template, such as a sidebar or footer.

    <?php query_posts('pagename=about'); ?>
    <?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    	<?php the_title('<h4>', '</h4>'); ?>
    	<?php the_content(); ?>
    	<?php endwhile; ?>
    <?php endif; ?>

    Like I said, there are probably slicker ways to do this, but these are a few I’ve employed.

    Thread Starter tomwilliamz

    (@tomwilliamz)

    Thanks Sew. I’ll give this a shot unless someone comes up with the ol’ magic bullet (or plugin)

    /t

    No problem. I’d spend some time searching in these forums, the plugins directory, and with our good friend, Google, to see what else you can find.

    Those two tricks have worked quite well for me. Usually, though, my clients don’t really update their sites as much as they think they will.

    This works brilliantly, sewmyheadon. Absolutely, the clients won’t be updating as much as they think, but they can see the right col content in a separate edit box on the CMS, instead of being stuck on the end of the main col content in a div.

    Now, can anyone give me an idea how I can get the Custom Fields box a)bigger and b)work with WYSIWYG?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two columns of text’ is closed to new replies.