Let $W$ be an extended affine Weyl group. We prove that the minimal length elements $w_{{\mathcal{O}}}$ of any conjugacy class ${\mathcal{O}}$ of $W$ satisfy some nice properties, generalizing results of Geck and Pfeiffer [On the irreducible characters of Hecke algebras, Adv. Math. 102 (1993), 79–94] on finite Weyl groups. We also study a special class of conjugacy classes, the straight conjugacy classes. These conjugacy classes are in a natural bijection with the Frobenius-twisted conjugacy classes of some $p$-adic group and satisfy additional interesting properties. Furthermore, we discuss some applications to the affine Hecke algebra $H$. We prove that $T_{w_{{\mathcal{O}}}}$, where ${\mathcal{O}}$ ranges over all the conjugacy classes of $W$, forms a basis of the cocenter $H/[H,H]$. We also introduce the class polynomials, which play a crucial role in the study of affine Deligne–Lusztig varieties He [Geometric and cohomological properties of affine Deligne–Lusztig varieties, Ann. of Math. (2) 179 (2014), 367–404].