Hello, I’m creating a newspaper website and I need the homepage to display recent posts from a variety of categories in a specific way so I created a custom template.
I just got started on it and trying to figure out why my sidebar is not actually on the side. It’s displayed below the posts. What did I do wrong?
THank you!
Rena
<?php
/*
Template Name: Snarfer
*/
?>
<?php
get_header();
?>
<div class="x-container max width main">
<div class="offset cf">
<div class="<?php x_main_content_class(); ?>" role="main">
<div class="customCat" <?php $catquery = new WP_Query( 'cat=65&posts_per_page=5' ); ?>
<ul style="list-style-type:none;">
<?php while($catquery->have_posts()) : $catquery->the_post(); ?>
<li><h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
By <?php the_author_posts_link(); ?> | <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('{Edit}'), ''); ?>
<?php the_post_thumbnail(); ?>
<ul style="list-style-type:none;"><li><?php the_excerpt(); ?></li>
</ul>
</li>
<?php endwhile; ?>
</ul>
<?php wp_reset_postdata(); ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php get_footer(); ?>
