Add Page Slug or name Class in Body tag of your WordPress pages

By February 11, 2017 Html, WordPress No Comments
page-class-body-tag

How to Add Page Name or Slug class in Body tag.

You can add page name class or slug name class on every page. so that you can change design  according to pages.

Now you will start seeing a new body class being outputted like this: page-{slug}. Use that class to override your default styles and customize elements for specific pages.


About Vijay Dhanvai

A passionate blogger by heart and mind, I have been working in this field for 7 years now. A WordPress Professional, web developer and designer who intends to guide his readers about Web Design, WordPress, Blogging, Web Development, and more.

Leave a Reply