Title: Error when using function in template
Last modified: August 21, 2016

---

# Error when using function in template

 *  Resolved [jkd77](https://wordpress.org/support/users/jkd77/)
 * (@jkd77)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/error-when-using-function-in-template/)
 * I get the following error:
 * Fatal error: Using $this when not in object context in /home/ssec/public_html/
   wp-content/plugins/last-modified-timestamp/last-modified-timestamp.php on line
   103
 * …when doing this in my theme template file:
 * <?php
    if( function_exists(‘get_the_last_modified_timestamp’) ) : $modifiedDate
   = get_the_last_modified_timestamp(); ?> <meta name=”date” content=”<?php echo
   $modifiedDate; ?>” scheme=”” /> <?php endif; ?>
 * Thoughts?
 * [https://wordpress.org/plugins/last-modified-timestamp/](https://wordpress.org/plugins/last-modified-timestamp/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Evan Mattson](https://wordpress.org/support/users/aaemnnosttv/)
 * (@aaemnnosttv)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/error-when-using-function-in-template/#post-4700795)
 * Thanks for bringing this to my attention.
 * I’ve fixed this with the latest release (1.0.3).
 * Let me know if you have any further problems.
 * Cheers!

Viewing 1 replies (of 1 total)

The topic ‘Error when using function in template’ is closed to new replies.

 * ![](https://ps.w.org/last-modified-timestamp/assets/icon-256x256.jpg?rev=3200533)
 * [Last Modified Timestamp](https://wordpress.org/plugins/last-modified-timestamp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/last-modified-timestamp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/last-modified-timestamp/)
 * [Active Topics](https://wordpress.org/support/plugin/last-modified-timestamp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/last-modified-timestamp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/last-modified-timestamp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Evan Mattson](https://wordpress.org/support/users/aaemnnosttv/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/error-when-using-function-in-template/#post-4700795)
 * Status: resolved