Although they are synonyms 'transverse' and ' diagonal' do not necessarily mean the same thing. Without knowing exactly what the writer meant when they chose the word 'transverse' to describe the bar,it is not possible to determine if the writer intended 'transverse' to mean 'diagonal'.
Common synonyms of transverse, excluding diagonal, include:
If the writer meant that the bar joins the two posts but runs at an oblique angle between them (i.e. neither parallel or at 90°), then diagonal would be an acceptable replacement for transverse.
If the writer meant that the bar joins the two posts but runs horizontally between them, intersecting them at an angle of 90°, then diagonal would not be an acceptable replacement for transverse.