The Pres was never part of the party, never will be. but all politicians base their actions and words on public opinion and their chances of being re-elected.
POTUS is of course in a position of power and influence, therefore he has effect on public opinion, good or bad