Reading Time: 6 mins Ever hear of WordPress generated classes? Know where they are and what they do? Odds are, if you are a past version of me, you might be removing them without realizing. You might also be underestimating why keeping them is important. Whether you’re building a site with Sass, integrating a framework like Foundation 5, or building a custom theme from scratch, you will need these classes. Why? Well, I’ll tell you. Current me has learned from past me. Okay – I’ll stop saying that because I’m confusing myself… Where are they? You can find these classes in most standard WordPress themes, including some starter themes like the Underscores theme in the style.css file. This file is a required file for WordPress themes to show up on the dashboard, and if you’re looking for these classes, you’ll likely find them here. Generated Classes Copied from the WP Codex /* =WordPress Core -------------------------------------------------------------- */ .alignnone { margin: 5px 20px 20px 0; } .aligncenter, div.aligncenter { display: block; margin: 5px auto 5px auto; } .alignright { float:right; margin: 5px 0 20px 20px; } .alignleft { float: left; margin: 5px 20px 20px 0; } a img.alignright
Share This