Sometimes you can hold up a standard that you don’t live up to yourself.
America frequently gets criticized for that. We hold up democracy and basic human rights. Foreign countries look at any flaw in our system and call us hypocritical.
That doesn’t make the standard wrong. And it doesn’t make America wrong for holding up the standard, even if sometimes we struggle to live up to it ourselves.
Likewise Trump having failed marriages does not invalidate his support for traditional marriage.
It does not make traditional marriage wrong, but it does call into question whether Trump himself really believes in it.