$object_id is supposed to be a post’s ID, make sure first that $post->ID would even output an ID, if not, the problem lies there.
$object_id is supposed to be a post’s ID, make sure first that $post->ID would even output an ID, if not, the problem lies there.