Notice- undefined variable post and trying to get property of non-object October 18, 2022 by Tarik Billa If you are using a custom loop. Please use $query->post to get the post object.