Title: Undefined property: WP_Post_Type::$ID
Last modified: December 2, 2019

---

# Undefined property: WP_Post_Type::$ID

 *  Resolved [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * (@odedta)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/)
 * Hello,
    I have a test site with Woocommerce, Elementor and Sensei LMS installed
   with a blank theme. After activation of Sensei LMS and creating my first course
   I view the course archive page and I get a lot of these errors: `Notice: Undefined
   property: WP_Post_Type::$ID in /home/odedtacom/public_html/websites/tests/wp-
   includes/class-wp-query.php on line 3965`
 * Any idea what’s that?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fundefined-property-wp_post_typeid%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12205462)
 * Hi there
 * This may be a theme compatibility issue. Could you take a look at this Github
   issue and let us know what theme you’re using?
 * [https://github.com/Automattic/sensei/issues/2754](https://github.com/Automattic/sensei/issues/2754)
 *  Thread Starter [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * (@odedta)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12207240)
 * Hello Dan,
    Thanks for replying! I am using Elementor Pro and Hello Elementor
   theme, it’s an empty test site. There is no where for me to add that code since
   Elementor should take over single and archive templates in general. If Sensei
   is not supported with Elementor I could add that code to Sensei template files
   and this problem will be fixed?
 * Thanks
 *  Plugin Support [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12223881)
 * I’ve added Hello Elementor to the Github report. For now adding the code in the
   file suggested may fix the problem:
 * [https://github.com/Automattic/sensei/blob/4634a1852d50e120665d39ab5e09fb7426ce2514/includes/unsupported-theme-handlers/class-sensei-unsupported-theme-handler-page-imitator.php#L71](https://github.com/Automattic/sensei/blob/4634a1852d50e120665d39ab5e09fb7426ce2514/includes/unsupported-theme-handlers/class-sensei-unsupported-theme-handler-page-imitator.php#L71)
 *  Thread Starter [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * (@odedta)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12226255)
 * Right, thank you very much Dan.
 *  Thread Starter [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * (@odedta)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12533120)
 * Hello again Dan, this error just started up again when I go on the course archive
   page.
    I get these errors:
 *     ```
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Trying to get property 'ID' of non-object in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-content/plugins/sensei-lms/includes/unsupported-theme-handlers/class-sensei-unsupported-theme-handler-page-imitator.php on line 247
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$ID in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3965
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$post_title in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3967
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$post_name in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3969
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$ID in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3965
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$post_title in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3967
       [11-Mar-2020 16:10:24 UTC] PHP Notice:  Undefined property: WP_Post_Type::$post_name in /home/brigitte/public_html/dev.brigittesarfati-app.com/wp-includes/class-wp-query.php on line 3969
       ```
   
 * I think this is related to another issue I have with Sensei that it doesn’t seem
   to be able to progress from Lesson 1 to Lesson 2.
 * I even tried to copy the entire function `output_content_as_page` to make sure
   I have the exact function.
 * Could you help please?
    -  This reply was modified 6 years, 2 months ago by [Oded Talmon](https://wordpress.org/support/users/odedta/).
 *  Thread Starter [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * (@odedta)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12533271)
 * I’m attaching screenshots of the issue i’m having and I think it’s related.
    
   [https://ibb.co/7Jcc54Y](https://ibb.co/7Jcc54Y) [https://ibb.co/V2yypPd](https://ibb.co/V2yypPd)
   [https://ibb.co/njwDXLg](https://ibb.co/njwDXLg)
 * The Complete course button doesn’t take me from Lesson 1 to Lesson 2.

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

The topic ‘Undefined property: WP_Post_Type::$ID’ is closed to new replies.

 * ![](https://ps.w.org/sensei-lms/assets/icon-128x128.gif?rev=2914239)
 * [Sensei LMS - Online Courses, Quizzes, & Learning](https://wordpress.org/plugins/sensei-lms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sensei-lms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sensei-lms/)
 * [Active Topics](https://wordpress.org/support/plugin/sensei-lms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sensei-lms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sensei-lms/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Oded Talmon](https://wordpress.org/support/users/odedta/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/undefined-property-wp_post_typeid/#post-12533271)
 * Status: resolved