Title: Warning: Undefined variable $post
Last modified: August 30, 2022

---

# Warning: Undefined variable $post

 *  [ssailer](https://wordpress.org/support/users/ssailer/)
 * (@ssailer)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-undefined-variable-post/)
 * I exported the plugin from the live site, so I can keep a local backup, but I’m
   getting errors on all of the pages where I’m using the plugin. Can you help with
   this, please?
 * Warning: Undefined variable $post in C:\xampp\htdocs\testsite\wp-content\plugins\
   insert-php-code-snippet\shortcode-handler.php(99) : eval()’d code on line 1
 * Warning: Attempt to read property “ID” on null in C:\xampp\htdocs\testsite\wp-
   content\plugins\insert-php-code-snippet\shortcode-handler.php(99) : eval()’d 
   code on line 1
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-undefined-variable-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Warning: Undefined variable $post’ is closed to new replies.

 * ![](https://ps.w.org/insert-php-code-snippet/assets/icon-128x128.png?rev=1800967)
 * [Insert PHP Code Snippet](https://wordpress.org/plugins/insert-php-code-snippet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php-code-snippet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php-code-snippet/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ssailer](https://wordpress.org/support/users/ssailer/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/warning-undefined-variable-post/)
 * Status: not resolved