WordPress.org

Ready to get started?Download WordPress

Forums

Put content in posts_nav_link() (1 post)

  1. Ehegwer
    Member
    Posted 6 years ago #

    How is this done?

    It's going to be a photoblog (so lots of people will want to see how this is done)

    Simply -
    One entry per page - Content is a large image
    click on the content, and you are taken to the previous entry.

    this is what I have right now, and it's not working. It takes you to the same entry (and I want to go to one BEFORE this entry.

    <?php get_header(); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
         <div id="content">
    
    	       <div class="entry">
    	            <div class="box-contents">
    
    <a href="<?php echo get_permalink($previous_post->ID); ?>"><?php the_content(); ?></a>
    
    	                 <div class="pie">
    
    <span class="comments">
    <?php comments_popup_link('Be the first to comment on this picture', ' (1) Comment', ' (%) Comments'); ?>
    </span>
                             </div>
    	            </div>
    	       </div>
    <?php endwhile; ?>
    <?php endif; ?>
         </div>
    
    <?php get_footer(); ?>

    Anyone have an elegant, simple solution

Topic Closed

This topic has been closed to new replies.

About this Topic