Jump to content

newbie needs help! search query for last/next post on blog


jredsmyth

Recommended Posts

 

Hi,

I'm new to Wordpress. I've got my site (http://www.uprlip.com) running almost exactly as I would like it to. Basically I'm running two seperate categories as two columns on the main page to make it appear to be two blogs essentially. I want to ad a forward post button, and a back post button to the main page while maintaining the dual-column category look. I've tried a few things and haven't been able to get it to work. The code I'm using to call the categories is located in the 'index.php' file and looks like this:

<div id="content" class="narrowcolumnJ" role="main">

<div style="float:left;width:380px;padding:10px;">
<?php $my_query = new WP_Query('category_name=J&showposts=1'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
		<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
			<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

			<div class="entry">
				<?php the_content('Read the rest of this entry »'); ?>
			</div>

			<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
		</div>
<?php endwhile; ?>
</div>
</div>

There's that section of code, then a section exactly like it for the 'M' category. I just need to have a forward and back button above my footer so people can click and get back or forwards. If they're on day, 2 go back to day, 1 ect ect ect.

 

If anybody has any ideas for me that would be mucho greato. Thank you very much.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.