I’m displaying the 2 newest posts horizontally on my home page (own template design) which works just fine.
I’m displaying all of the posts on an ‘archive’ page, but on this page they are showing vertically for some reason?
I want 2 columns of posts next to each other, but what works on one page isn’t on this!
Here’s the code on ‘archive’
[php]
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="twinposts" id="post-<?php the_ID(); ?>">
<?php
$myposts = get_posts('');
foreach($myposts as $post) :
setup_postdata($post); /* adds the content */
?>
<?php the_title('<h2>', '</h2>'); ?>
<?php the_content(); ?>
<?php endforeach; wp_reset_postdata(); ?>
<div id="postedinfo">
<?php edit_post_link(__('Edit', 'fizzblog'), '', ' | '); ?>
</div>
</div> <!-- twinposts -->
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<div class="empty"></div>
Twinposts is floated left with a width of 46%.
Any ideas? It’s driving me slowly mad…