Support » Fixing WordPress » next/previous links not showing up ?

  • hey all,

    i’m quite experienced editing wordpress and html/css/php. but i’ve recently installed a new theme on a blog of mine (a magazine type theme, which came without the next/prev links…i’m trying to insert them onto the single page file). well, for some reason which i cannot figure out, they are not showing up at all.

    i’ve tried adding <?php previous_posts_link(); ?>
    <?php next_posts_link(); ?> to the relevant areas (right before the endwhile), but no dice? regular text shows up just fine if i insert it, but not the next/prev links. i haven’t changed the index to show any less than 10 posts, so i’m not sure what’s going on. i’ve never had this problem before.

    any ideas? this is driving me crazy

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    I’m experiencing the same issue. I installed a theme for my blog and it doesn’t have the “Next” and “Previous” links that would appear at the bottom of the page, so that people can navigate to older posts as I’d like to only have 10 post on the page, to reduce page load time.

    I’m not experienced in PHP and am a but confused as to where this following code I found on the codex site should go.

    <div class=”navigation”><p><?php posts_nav_link(); ?></p></div>

    <?php posts_nav_link(‘separator’,’prelabel’,’nextlabel’); ?>

    Please could you point someone direct me to the right place.

    Many thanks!

    i have this same problem.
    lots of people.
    anyone know how to fix?

    I managed to get “something” not completely working. The next/previous page links are now showing under every post. Can anyone tell me what I could be doing wrong?

    Here’s my code:

    <?php get_header(); ?>
    <div class="contentLayout">
    <div class="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="Post">
     <div class="Post-body"><p></p>
    <div class="Post-inner">
    <h2 class="PostHeaderIcon-wrapper"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    <?php if (!is_page()): ?>
    <div class="PostMetadataHeader">
    <img class="metadata-icon" src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="PostDateIcon"/> <?php the_time('F jS, Y') ?> | <img class="metadata-icon" src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="14" height="14" alt="PostAuthorIcon"/> Author: <a href="#" title="author"><?php the_author() ?></a><?php edit_post_link('Edit', ' | '); ?>
    <?php endif; ?>
    <div class="PostContent">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <?php if (!is_page()): ?>
    <div class="PostMetadataFooter">
    <img class="metadata-icon" src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon"/> Category: <?php the_category(', ') ?> | <img class="metadata-icon" src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="18" height="18" alt="PostTagIcon"/> <?php the_tags('Tags: ', ', ', ' '); ?> | <img class="metadata-icon" src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon"/> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    <?php endif; ?>
    <?php if (is_single() &amp;&amp; !is_page()): ?>
    <div class="navigation">
    <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
    <div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    <?php comments_template(); ?>
    <?php endif; ?>
    <?php if (is_page()) edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    <?php next_posts_link('&laquo; Older Entries') ?>
    <?php previous_posts_link('Newer Entries &raquo;') ?>
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php endif; ?>
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    <div class="clear-float"></div>
    <?php get_footer(); ?>

    Thank you in advance!



    webdiva, it looks like your next_posts_link and previous_posts_link are inside the loop which is why they would show up in every post. move them below the endwhile statement for them to only occur once.

    I am having the same problem with the post_nav_link not showing up. they show up in single.php but not in my index.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘next/previous links not showing up ?’ is closed to new replies.