Title: Recent update causing post_ID errors?
Last modified: November 14, 2021

---

# Recent update causing post_ID errors?

 *  Resolved [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * (@dmcclain)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/)
 * Metaslider Version 3.23.3
    MetaSlider – Pro Add-on Pack Version 2.18.3
 * Last week our site began to have serious layout issues, and we also noticed the
   error message on the page linked above. Error logs show a similar issue,
    PHP
   Notice: Undefined variable: _post in /var/www/html/wordpress/wp-content/themes/
   grady/template-parts/degree-faculty.php on line 52 line 52 is `$post_thumb = 
   get_the_post_thumbnail_url( $_post->ID, 'full' );`
 * When I deactivated Metaslider and the Add-on Pack, the layout issue resolved 
   itself but the error message on the story link stayed.
 * Could the recent Metaslider code update be causing this? The only other plugin
   we’ve had update in the last week was Advanced Custom Fields, and those devs 
   do not think they’re causing our issues.
 * Our theme was built by a local company that went out of business during the pandemic,
   so I’m investigating this rather blindly. Thanks for any help you can provide!
 * -don
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frecent-update-causing-post_id-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Arreane](https://wordpress.org/support/users/yanex/)
 * (@yanex)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/#post-15069147)
 * Hi,
 * The link you provided doesn’t seem to have MetaSlider activated at all. The error
   isn’t also related to MetaSlider.
 * If you take a closer, the error is pointed out to the your theme.
 * Although the issue is not related to MetaSlider, you can try fixing it by updating
   that line to
    `$post_thumb = get_the_post_thumbnail_url( $post->ID, 'full' );`
   or `$post_thumb = get_the_post_thumbnail_url( get_the_ID, 'full' );`
 *  Thread Starter [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * (@dmcclain)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/#post-15070151)
 * Thank you so much for your attention.
 * Your suggestion did help me fix one error, I am grateful.
 * I still don’t know what caused our errors, nothing updated on our site except
   for the two plugins, but for now things seem stable. I wonder if this has anything
   to do with PHP itself, I will continue investigating.
 * Thanks again!
 * -don
 *  [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/#post-15071511)
 * `$post` should be known in the context as a `global` for the first line to work.
 * And since `get_the_ID` is a function, the second line would be:
 * `$post_thumb = get_the_post_thumbnail_url( get_the_ID(), 'full' );`
 *  Thread Starter [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * (@dmcclain)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/#post-15126693)
 * [@galbaras](https://wordpress.org/support/users/galbaras/), thank you so much
   for your reply to this ticket!
 * I’m still not sure what has updated to cause these errors to crop up suddenly,
   but in the last couple of weeks I’ve used your code suggestion to repair 4 different
   pages.
 * I didn’t write the original code, in fact I’m struggling to understand any of
   this 🙂 but I am so grateful you took the time to help me out.
 * -don

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Recent update causing post_ID errors?’ is closed to new replies.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=2771717)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [dmcclain](https://wordpress.org/support/users/dmcclain/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/recent-update-causing-post_id-errors/#post-15126693)
 * Status: resolved