WordPress.org

Ready to get started?Download WordPress

Forums

create 2 column posts starkers theme (2 posts)

  1. melanie bund
    Member
    Posted 1 year ago #

    i would like to create 2 column posts "colleft" and "colright" in index.php starkers theme as i want an intro text in one and a gallery in the other - as you can see both are now in first column
    site
    http://www.maonaimagem.com/wordpress/
    code

    <div id="colleft">
    <?php if ( have_posts() ): ?>
    <ol>
    <?php while ( have_posts() ) : the_post(); ?>
    	<li>
    		<article>
    			<h2><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    			<?php the_content(); ?>
    		</article>
    	</li>
    <?php endwhile; ?>
    </ol>
    <?php else: ?>
    <h2>No posts to display</h2>
    <?php endif; ?>
    <div id="colright"></div>
    <div class="clear"></div>

    Can anyone help?
    thanks in advance

  2. melanie bund
    Member
    Posted 11 months ago #

    Hi
    I would still like to create 2 columns but now diff posts in 2 columns in the STARKERS THEME - the code i have is -

    <div id="indexpost"><?php if ( have_posts() ): ?>
    
    <ol>
    <?php while ( have_posts() ) : the_post(); ?>
    
    <li>
    		<article>
    			<h2 class="index"><a>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    			<p class="indexpost"><?php the_content(); ?></p>
    		</article>
    	</li>
    <?php endwhile; ?>
    </ol>
    <?php else: ?>
    <h2>No posts to display</h2>
    <?php endif; ?>
    </div>
    
    have tried
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id="indexpost">
    <article>
    			<h2 class="index"><a>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    			<p class="indexpost"><?php the_content(); ?></p>
    		</article>
    
    <div class="news" id="post-<?php the_ID(); ?>">
    <article>
    			<h2 class="index"><a>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    			<p class="indexpost"><?php the_content(); ?></p>
    		</article>
    </div><!--indexpost-->
    </div><!--news-->
    <?php endwhile; ?>
    <?php else: ?>
    <h2>No posts to display</h2>
    <?php endif; ?>

    but does not work
    CAN SOMEONE HELP

Topic Closed

This topic has been closed to new replies.

About this Topic