Slug as body class
Want to have css styling rules for individual pages or posts?
Consider an alternative
Slug as body class shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 12 years ago, and scores 37/100 on our health check.
- Small user base (100+ active installs)
- No update in 12 years
- Only tested up to WordPress 3.9 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Slug as body class stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| body | >100 |
| slug | >100 |
| url | >100 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 5 from 6 reviews
About Slug as body class
From the official readme · v1.0Description
Want to have css styling rules for individual pages or posts?
This plugin adds a unique class to the body tag of the html. The added class is formatted as “[post_type]-[post_name]”. For a page with slug (= post_name) “about” it will be “page-about”, and for a post named “today” it will be “post-today”. Currently no slug will be added for archive and category pages. Please let us know if you need this and we will add it.
example
Say you want to have a red title on your contact page. With this plugin all you need to do is add this line to your css:
body.page-contact h1 {
color : red;
}
Acknowledgements
Thanks to Damiaan van Vliet for this plugin idea http://www.albuswebdesign.nl/.
Installation
In the WordPress backend, search for the plugin ‘slug-as-body-class’. Install and activate it and you are done.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Slug as body class alternatives
All body plugins →FAQ
Slug as body class: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Nov 17, 2026
Is Slug as body class free?
Yes. Slug as body class is free to download and use from the official WordPress.org plugin directory.
Is Slug as body class safe to use in 2026?
Slug as body class shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 12 years ago, and scores 37/100 on our health check.
How many websites use Slug as body class?
Slug as body class is active on 100+ WordPress websites and has been downloaded 3,795 times since it launched in August 2014. It was downloaded 95 times in the last 30 days.
Does Slug as body class work with WordPress 7.1?
Slug as body class is officially tested up to WordPress 3.9.40, while the latest release is 7.1.4. It may still work, but try it on a staging site first.
When was Slug as body class last updated?
The latest version, 1.0, was released on August 11, 2014 (12 years ago).
Who makes Slug as body class?
Slug as body class is developed and maintained by Carlo Roosen.
What are the best alternatives to Slug as body class?
The most popular alternatives to Slug as body class are Head & Footer Code (100K+ installs), Custom Body Class (10K+ installs) and Header Footer Script Adder (1K+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card