A compact wideband and dual‐band antenna with directional patterns is proposed. The antenna is mainly composed of three substrates, a rectangular radiation patch, a slotted ground, a microstrip feed line, and an L‐shaped feeding structure that consists of a rectangular patch and a cuboid metal. Using the L‐shaped feeding structure, the antenna can operate in a high‐order mode, and a wideband and dual‐band antenna is achieved. The measured impedance bandwidths are 10.0% (12.3–13.6 GHz) for the lower frequency band, and 22.3% (16.7–20.9 GHz) for the higher frequency band. The radiation patterns at two pass‐bands are stable, and the average gains at lower and higher frequency are 7.0 dBi and 5.7 dBi, respectively. The details of the antenna design, the operation mechanism, and the simulated and measured results are presented. © 2015 Wiley Periodicals, Inc. Microwave Opt Technol Lett 57:2742–2745, 2015