University Marketing & Communications

December 19, 2012

Commenting code in the WordPress Editor

By University of Washington

To comment code in the WordPress Editor, you must comment code within an element and not around it.


To comment out the following anchor…
<a href="" title="Google">Google</a>
do the following:
<!--a href="" title="Google">Google</a-->

Here’s another example, starting with the h3 tag and ending with the image tag:

Named after Edmond S. Meany, the history professor, registrar and prominent civic leader for whom the UW's Meany Hall is also named, the Edmond Meany Hotel (1930-1931) remains an impressive landmark in the University District and is currently home to the Hotel Deca.
<img src="" alt="Drumheller Fountain" width="150" height="89" /-->