Support » Fixing WordPress » next/previous not showing up

  • I have tried to edit my code so that the previous_post_link function displays the text “Previous” on my site instead of the actual title of the article. I’ve looked at and tried to follow the directions there by editing the function accordingly in archives.php, but the changes are not showing up.

    The original code is as follows:

    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>

    Here’s what I tried (unsuccessfully) to get it to just say ‘next’ or ‘previous’:

    <div class="navigation">
             <div class="alignleft"><?php next_post_link('%link', 'Next', TRUE); ?></div>
             <div class="alignright"><?php previous_post_link('%link', 'Previous', TRUE); ?></div>

    Again, I believe I followed the directions perfectly on . These changes were made in the archives.php file. Is there another file that should be edited? FWIW, I’m using the Compromise theme.

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

    I tried here what you are doing and it worked fine.

    I downloaded the Compromise theme – it has two sets of page links on the single page

    The set just below the content area uses wp_link_pages.
    The set you are working on is after the comments section ends.

    Make sure you are changing the code that creates the links you want to change.

    Alright, it’s still not happening for me. The site I’m working on is . If you click on any article then scroll to the bottom, I want it to read Next | Previous instead of the title of the article. From what I understand, the wp_link_pages function you referenced manipulates the link text of articles that are multiple pages…right? I think I need to work with the next_post_link, but I’m not totally sure since everything I’ve done with it doesn’t effect what I’m trying to accomplish.

    Yea I’ve already seen this page and tried using these functions to no avail. I also have that plugin.

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