Title: Undefined variable $post_types
Last modified: February 24, 2021

---

# Undefined variable $post_types

 *  Resolved [-Mark-](https://wordpress.org/support/users/-mark-/)
 * (@-mark-)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-post_types/)
 * Hi,
 * the plugin itself works great and did the last years. Thanks for that.
 * I just discovered a PHP Warning:
 * Undefined variable $post_types in wp-content/plugins/yet-another-related-posts-
   plugin/classes/YARPP_Core.php on line 1103
 * I am running PHP 8.

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

 *  [PolyWogg](https://wordpress.org/support/users/polywogg/)
 * (@polywogg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-post_types/#post-14104450)
 * Same error but in 7.4
    -  This reply was modified 5 years, 2 months ago by [PolyWogg](https://wordpress.org/support/users/polywogg/).
 *  Plugin Support [Michael Nelson](https://wordpress.org/support/users/mnelson4/)
 * (@mnelson4)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-post_types/#post-14107530)
 * Thanks [@-mark-](https://wordpress.org/support/users/-mark-/) and [@polywogg](https://wordpress.org/support/users/polywogg/)!
   We are working on a fix currently. But it doesn’t appear to be a problem beyond
   the warning you’re seeing. We’ll update this issue when the fix is released.
 *  [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-post_types/#post-14118343)
 * [@mnelson4](https://wordpress.org/support/users/mnelson4/) Same with 7.3:
 * `Notice: Undefined variable: post_types in .../wp-content/plugins/yet-another-
   related-posts-plugin/classes/YARPP_Core.php on line 1103`
 *  Plugin Support [Michael Nelson](https://wordpress.org/support/users/mnelson4/)
 * (@mnelson4)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-post_types/#post-14118851)
 * YARPP 5.13.1 should fix this. Feel free to reopen this issue if the problem persists.
   
   Thanks for reporting and sharing debug info [@-mark-](https://wordpress.org/support/users/-mark-/)
   [@polywogg](https://wordpress.org/support/users/polywogg/) and [@designextreme](https://wordpress.org/support/users/designextreme/).

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

The topic ‘Undefined variable $post_types’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Michael Nelson](https://wordpress.org/support/users/mnelson4/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-post_types/#post-14118851)
 * Status: resolved