TypeError thrown

Unsupported operand types: WP_Post - int