[wp-trac] [WordPress Trac] #54866: Add 'go back' function to WordPress PHP

WordPress Trac noreply at wordpress.org
Thu Jan 20 16:42:07 UTC 2022


#54866: Add 'go back' function to WordPress PHP
-----------------------------+-----------------------------
 Reporter:  wpetro           |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Query            |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 It could be helpful if you could add a "go back" PHP function to
 WordPress.
 For example, if a user lands on the main page of a site [https://places-
 to-eat-near-me.com/], then clicks on ''Restaurants'' in the navigation
 bar, and moves to another page on the same site [https://places-to-eat-
 near-me.com/restaurants/], the user will be able to click on a 'go back'
 button in the navigation bar, or elsewhere on the page, to quickly go back
 to the last visited page on the site [https://places-to-eat-near-me.com/].

 Maybe something like this to print the href attribute of the last visited
 page on the site?
 {{{
 <?php get_last_page() ?>
 }}}

 It can be very useful in some occasions.

 Thanks in advance!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54866>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list