Posted By

kristarella on 02/02/09


Tagged

thesiswp refer


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

jeremyhcobb
umang_nine
girliegeek
LordBumpet
joelhaus
userpiv
naeemnur
voove


Referrer link


 / Published in: PHP
 

This adds a link to the page that the viewer just came from (if they came from another page).

  1. function referrer_link() {
  2. $refer = $_SERVER['HTTP_REFERER'];
  3. if ($refer) {
  4. echo '<a href="' . $refer . '">Go back</a>';
  5. }
  6. }
  7. add_action('thesis_hook_before_content', 'referrer_link');

Report this snippet  

You need to login to post a comment.