• rezza72

    (@rezza72)


    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

    (@epicdevspace)

    Hi there

    solution: https://codex.ww.wp.xz.cn/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

    (@rezza72)

    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

    (@epicdevspace)

    The process is outlined in detail here with great examples

    There is no way around modifying your files. Backup your site before attempting any changes.

    All the best!

    Thread Starter rezza72

    (@rezza72)

    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.