WP Munk > Blog >

wordpress default class

How to Add Custom Body Classes in WordPress

The “body_class()” ┬áin WordPress adds classes to the body tag of all the pages in your WordPress site. By default a WordPress theme should use the function “body_class()” in their theme files so that WordPress can automatically output correct classes to each page/post and archive. The following example shows how to implement the body_class template tag into a theme. The actual HTML output might resemble something like this: If you […]