Title: Back Button in Pages
Last modified: August 31, 2016

---

# Back Button in Pages

 *  [rezza72](https://wordpress.org/support/users/rezza72/)
 * (@rezza72)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/)
 * Hi there
    First, I apologize if my English is not good. I hope you get my noticed.
   I want use the back button in posts and pages on my site. I know that to do that
   I must use this code :
 *     ```
       <a href="window.history.back();">go back</a>
       ```
   
 * But my problem is with this code :
 * If I go from X page to Y page, then i go from Y page to Z page , and then I use
   the back button on the Z page , take me to the Y page .
    And then if I use the
   back button on Y page, take me to the Z page . While I want when I use the back
   button on Y page, take me to the X page .
 * I do What should I do?
    Grateful

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

 *  [epicdevspace](https://wordpress.org/support/users/epicdevspace/)
 * (@epicdevspace)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/#post-7409418)
 * Hi there
 * solution: [https://codex.wordpress.org/Next_and_Previous_Links](https://codex.wordpress.org/Next_and_Previous_Links)
 * You can add the previous link (name it ‘go back’ if you wish) and follow the 
   detailed instructions to integrate the solutions for pages and posts.
 * All the best!
 *  Thread Starter [rezza72](https://wordpress.org/support/users/rezza72/)
 * (@rezza72)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/#post-7409421)
 * hi
    Thank you for your guidance I am a beginner. Which code should I put where?
   I am using the buttons on the pages. Put I the codes Replace button Links ??
 *  [epicdevspace](https://wordpress.org/support/users/epicdevspace/)
 * (@epicdevspace)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/#post-7409432)
 * The process is outlined [in detail here with great examples](https://codex.wordpress.org/Next_and_Previous_Links)
 * There is no way around modifying your files. Backup your site before attempting
   any changes.
 * All the best!
 *  Thread Starter [rezza72](https://wordpress.org/support/users/rezza72/)
 * (@rezza72)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/#post-7409434)
 * hi
    and tnx again for your help . put i this code :
 * `<?php posts_nav_link('separator','prelabel','nextlabel'); ?>`
 * in bottom of page.php file ???

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

The topic ‘Back Button in Pages’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [rezza72](https://wordpress.org/support/users/rezza72/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/back-button-in-pages/#post-7409434)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
