WordPress tries to include a post template, but we have zero posts on the site, how to debug?

[ad_1]

WordPress apparently tries to include the post-template.php for a non-existent post and gives the error “Attempt to read property ID / post\_type on null”. We don’t have any posts, it is not a blog. I have no idea which plugin or theme or code does this. What we have is Elementor Pro, Kadence theme, Fluent Form and some minor plugin not related to posts. PHP version is 8.0.30. The problem shows only on frontend, it does not show up in admin preview. How can I debug it, is there any best practice?

[ad_2]
1 Comment
  1. The simplest debugging plan would be:

    * Backup the site
    * Deactivate 1 plugin – see if the error is resolved
    * If yes – then stop
    * If no – then reactivate plugin, and deactivate the next one down the list
    * If you can’t isolate the issue this way, then deactivate all plugins.
    * Then go through reactivating 1 at a time and see when the error pops up.

    Tedious but it’ll work

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer