Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Wordpress: Back button

  • 16-11-2018 04:46PM
    #1
    Posts: 597 ✭✭✭


    Hi,
    I would like to create a back button on my site which I have found some widgets capable, however, I am using SiteOrigin buttons and would like to continue using the same format.
    Can anyone help with code I can place within the button to go back a page?


Comments

  • Registered Users, Registered Users 2 Posts: 6,679 ✭✭✭daymobrew


    What exact problem are you trying to solve?
    Would breadcrumb navigation work?

    Can't the user simply use the brower's Back button?
    Or you could create a button with a href for javascript(back(-1)) or whatever the basic code is.


  • Registered Users, Registered Users 2 Posts: 16,415 ✭✭✭✭Trojan


    daymobrew wrote: »
    Or you could create a button with a href for javascript(back(-1)) or whatever the basic code is.

    Yep:
    <button onclick="window.history.back()">Back</button>
    
    or
    <button onclick="window.history.go(-1)">Back</button>
    
    (You can change the parameter value.)
    daymobrew wrote: »
    What exact problem are you trying to solve?
    Would breadcrumb navigation work?

    Can't the user simply use the brower's Back button?

    This is the more important issue.

    Is there a problem with your site navigation? Maybe you need to work on the navigation links.


Advertisement