Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter cheese63

    (@cheese63)

    Hi there, thanks for the response!

    It turns out there was a widget that had a custom function in it. The logic in the widget did something like this:

    function some_function($post_id)
    {
    //make a wordpress DB query using $post_id
    }
    global $post;
    some_function($post->ID);

    The problem is that $post, for the page being rendered, was an integer representing the post id, and not the actual $post object as would have been expected! Not sure why that is, but I got rid of the logic and everything worked again.

Viewing 1 replies (of 1 total)