WordPress.org

Ready to get started?Download WordPress

Forums

Two columns within select 'Pages' (5 posts)

  1. archshrk
    Member
    Posted 8 years ago #

    I want to make one of my 'Pages' two columns (instead of one) but don't know how to do this without screwing up all pages. The content on this page needs to be two columns.
    http://archshrk.com/what-to-read How would I set that up?

  2. moshu
    Member
    Posted 8 years ago #

    Simple. You have to make a Page template that has 2 columns in the content area and create your Page using that template.
    More Pages#Page_Templates

  3. archshrk
    Member
    Posted 8 years ago #

    Ok, that makes sense. But how would I actually make the column? If my page.php looks like this
    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?>
    <span class="edit"><?php edit_post_link(__('edit this page')); ?></span>
    </h2>
    <div class="storycontent">
    <?php the_content(__('[ continued...]')); ?>
    </div>
    <p class="meta"><?php link_pages(); ?></p>
    <?php endwhile; else: ?>
    <?php include (TEMPLATEPATH . '/errormessage.php'); ?>
    <?php endif; ?>
    </div> <!--end .post -->
    <?php get_footer(); ?>
    Since my page is essecially a long list, how can I make it a two colum list? What div tags do I need to create/add? Am I even making sense?

  4. archshrk
    Member
    Posted 8 years ago #

    Ok, seems simple enough. But how would I edit this to make it work?

    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?>
    <span class="edit"><?php edit_post_link(__('edit this page')); ?></span>
    </h2>
    <div class="storycontent">
    <?php the_content(__('[ continued...]')); ?>
    </div>
    <p class="meta"><?php link_pages(); ?>

    <?php endwhile; else: ?>
    <?php include (TEMPLATEPATH . '/errormessage.php'); ?>
    <?php endif; ?>
    </div> <!--end .post -->
    <?php get_footer(); ?>

    how would I make the content span two columns?

  5. moshu
    Member
    Posted 8 years ago #

    I'd go by inserting two divs in the
    <div class="storycontent">
    2 DIVS HERE <====
    </div>

    where the_content used to be or in the post div; then give some id or class to those columns and define their size, position etc. in your stylesheet.

Topic Closed

This topic has been closed to new replies.

About this Topic