Deductions & credits

So if the parent works from inside the home it doesn’t count toward the credit because they aren’t physically going to a building other than their primary home for their preschool classes?