Load on homepage only

/ Published in: PHP
Save to your folder(s)

Used in template's, load this if home page etc

Copy this code and paste it in your HTML
  1. $uri = $_SERVER['REQUEST_URI'];
  3. // If homepage is Root, if using SEF it will be a full article link
  4. if ($uri == "/") {
  5. echo 'load this';
  6. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.