WordPress.org

Ready to get started?Download WordPress

Forums

Two Column Content? (8 posts)

  1. MediaJunkie
    Member
    Posted 8 years ago #

    Is it possible to split the content of a post into two columns?

    When I post especially long entries the content extends vertically down the page. I would like to make the content split into two columns.

    If possible I would like to have this done like the <!--more--> quicktag.

    For example, at a specific point in a long post I enter a quicktag called "split" and at that point a new column is started.

    I'm not asking specifically for a plugin request, just someone to push me in the right direction.

  2. slambert
    Member
    Posted 8 years ago #

    Try here: http://www.alistapart.com/articles/fauxcolumns/

    Not sure it will help, but might send you in a direction.

  3. MediaJunkie
    Member
    Posted 8 years ago #

    Not really what I'm looking for. But thanks for giving it a shot.

  4. slambert
    Member
    Posted 8 years ago #

    How about this, write div tags around what you want to appear in the second column.


    <div class="post-entry>This would be all the text in the 1st column
    <div class="2nd-column>This would be all the text in the second column. You sould have to write the div tag that surrounds this text into your post each time.</div>
    </div>

    Of course you would have to modify the css to create a second column and position it correctly, but that should work.

    I don't know if this is over your head, but hopefully it can point you in a direction.

  5. vkaryl
    Member
    Posted 8 years ago #

    Well, I think the OP wants an "automatic" solution - so that it just happens as heesh is typing....

    It could probably be programmed - by someone who's a real programmer, the which I am decidedly NOT....

  6. Ming
    Member
    Posted 8 years ago #

    If you wanted to use a <!-- split --> tag that'd be easy-ish. You'd need to assign your content to a variable using get_the_content(). Then just search and replace <!-- split --> with </div> <div class="secondColumn">. That'd close the first div you started before displaying the content and then start a second one. You'd use CSS to style the divs into columns.

    In your post loop it'd look roughly like this:


    <?php $content = get_the_content(); ?>
    <?php $content = str_replace( '<!-- strip -->', '</div> <div class="secondColumn">', $content); ?>

    <div class="firstColumn">
    <?php echo $content; ?>
    </div>

    Anyway, hope that's clear. Haven't tested at all but it should get you started.

  7. leMaxim
    Member
    Posted 8 years ago #

    I don't mean to be a bother, but I'd like to *bump* this thread in the hopes that somebody has come up with an automatic solution (or plugin) for this issue. Thanks.

  8. 3stripe
    Member
    Posted 8 years ago #

    I'd love to see this plugin as well. I've used a similarly convoluted method, and it's not good for clients!

    I also think it's very restrictive only having 1 column available, especially with multil column css layouts just around the corner

Topic Closed

This topic has been closed to new replies.

About this Topic