There's a well-known biblical phrase from Matthew 23:3 -- "they do not practice what they preach." In common use it's a way to call out a pompous moralizer who doesn't live up to the principles he uses to belittle or condemn others.
This is still more general in its application than the case you're looking for, but IMO it does come closer to the mark than the word "hypocrite." And what's more, if you see the phrase in its original context -- Jesus condemning the religious leaders of his time -- it actually comes very close to the idea you're trying to get across:
"Then Jesus said to the crowds and to his disciples: 'The teachers of the law and the Pharisees sit in Moses’ seat. So you must be careful to do everything they tell you. But do not do what they do, for they do not practice what they preach. They tie up heavy, cumbersome loads and put them on other people’s shoulders, but they themselves are not willing to lift a finger to move them.'" -- Matthew 23:1-4