Hi! here's you answer:
When we use in spanish those soccer terms, we usually translate them this way:
- "The bar" would be "el larguero" or "el travesaño"
- For "the post" you may either say "el poste" or "el palo"
- For "woodwork" there is no literal translated term in spanish (as it literally means "trabajo de madera"), so as it's used in english as the same for "crossbar", you may use the same words given before.
For the sentence given "Ronaldo ha pegado al larguero/poste", in fact it would only mean that the player itself crashed with the post. So, it would rather be "El tiro de Ronaldo pegó en el poste" or just "el tiro pegó en el larguero" (if you already know who did the shot).
It's important in spanish grammar to always include in a sentence the person who makes the action, either in an implicit or explicit way.
Regards