Quick Tip: BEM Naming and WordPress Filters for Navigation

Maintaining CSS is difficult, especially in bigger projects working with a team. Naming conventions can help your CSS be more readable and easier to maintain. In this quick tip we’ll look at how to use the BEM (Block Element Modifier) naming methodology in WordPress.

serverpoint hosting banner

Content management systems like WordPress output default classes in the front-end markup. In WordPress there are lots of filters to modify these outputted classes.

If you want to dive directly into code, here is an example theme of mine; filters can be found in inc/functions-filters.php file.

What is BEM?

BEM stands for Block Element Modifier.

“BEM is a methodology that helps you to create reusable components and code sharing in front-end development.�

You might also like More from author

Leave A Reply

Your email address will not be published.