How to add a "Last Updated at" field in footer area? I wanted to add a field in my website (in footer area), which can automatically display the "last updated" date.

I found the same question in SO but it is not working properly. While accessing some pages, I can see this field as blank with follow errors-

Notice: Undefined variable: node in include() (line 207 of O:\xampp\htdocs\rutag\sites\all\themes\skeletontheme\templates\page.tpl.php).
Notice: Trying to get property of non-object in include() (line 207 of O:\xampp\htdocs\rutag\sites\all\themes\skeletontheme\templates\page.tpl.php).


By saying "Last Updated at", I mean to say that the last date on which admin has updated (published/modified any content) the website.
Not all page types have a a $node object associated (the user page, for one does not).  You can get rid of the error message that says:

Notice: Undefined variable: node


by wrapping the call to format_date in an if-statement like this:

&lt;?php
if (isset($node-&gt;changed)) {
  print "Last modified date: " . format_date($node-&gt;changed);
}
?&gt;