If Congress passed a law next week forbidding convicted felons from holding federal office, would it apply to Trump (ex post facto)

I know that the Constiution forbids ex post facto sentencing. But does that apply to (for lack of a better choice of words) procedural legislation? Specifically, if Congress passed a law next week, and President Biden signed it, that fobids a convicted felon from holding federal office, would it apply to Trump? Or would the Constituion’s ex post facto language mean that Trump can’t be punished in this way?

The requirements for the Presidency are set out in the Constitution. To change those requirements would require an amendment, not a law.

That law could not apply to the offices of president and vice-president. Only an amendment to the constitution would.

A relevant example was the ruling by SCOTUS regarding Adam Clayton Powell’s attempt to return to the House after he was sent packing but then re-elected. The specifically cite the constitution as the sole list of requirements to be elected.

Strangely, it’s perfectly okay for each body to make and enforce rules regarding their members, e.g., in terms of conduct, etc.

I’m not sure if the Santos matter is covered by this.

I think it is worth adding that the SC’s decision that required Colorado to put Trump on the ballot did suggest that if congress passed a law forbidding insurrectionists from running, it could be valid under the 14th amendment. Of course, they would have to define insurrectionist.