get_the_ID() gives notice in 404 page
get_the_ID() is broken. function get_the_ID() { return get_post()->ID; } It tries to use the member ID on a function that returns a post object sometimes: /* * @return WP_Post|null WP_Post on success or null on failure */ function get_post( $post = null, $output = OBJECT, $filter=”raw” ) { get_posts() can return NULL, and NULL has … Read more