How Do I Add Another CSS Class in WordPress?

Adding a CSS class to a WordPress post or page is simple. To add a new class, open the post or page in your text editor, and add the class name between the opening and closing tags. For example, to add a new class to a post titled “My Post,” you’d add the following:.my-post {

background-color: #eee;

}

To add a new class to a page titled “My Page,” you’d add the following:.my-page {.