Slug as body class icon
Possibly abandoned Tested up to 3.9.40 #6 in body

Slug as body class

Want to have css styling rules for individual pages or posts?

Active installs100+100+ tier
Downloads · 30d95▲ +20.3% vs prev. 30d
Rating5/56 reviews
Health score37/100At risk
All-time downloads3.8KSince Aug 2014
Support resolved—No recent threads
RequiresWP 3.7PHP any
Downloads · 7d20▼ -25.9% week over week
Our verdict

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 & support

Daily downloads

246Aug 19Oct 2Nov 16
Yesterday5
Daily average (1y)2
Peak day8Nov 2, 2026
Last 12 months597

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Slug as body class stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
body >100 4,337 Best body plugins →
slug >100 8,168 Best slug plugins →
url >100 10,000 Best url plugins →

Version adoption

Share of active sites per release.

  • 1.0100.0%

Rating breakdown

★★★★★★★★★★ 5 from 6 reviews

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About Slug as body class

From the official readme · v1.0

Description

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.

Changelog

First release.

1.0

First publication on 2014 August 4

Full changelog on WordPress.org →

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.

Active installs badge Rating badge Health score badge

Best Slug as body class alternatives

All body plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 Head & Footer Code Head & Footer Code Easy add site-wide, category and article specific custom code before the closing and , or… by Aleksandar Urošević 100K+ ★★★★★★★★★★ 5 (51) 3 months ago 77
2 Custom Body Class Custom Body Class A plain simple plugin which allows you to add a custom CSS class the HTML body tag. by Andrei Lupu 10K+ ★★★★★★★★★★ 5 (21) 1 year ago 45
3 Header Footer Script Adder Header Footer Script Adder Easily insert custom HTML, CSS, and JavaScript into your WordPress site's header, body, and… by mahethekiller 1K+ ★★★★★★★★★★ 4.1 (7) 4 months ago 63
4 Add URL Slugs as Body Classes Add URL Slugs as Body Classes Add URL Slugs to body Class by Aaron T. Grogg 700+ ★★★★★★★★★★ 4.8 (5) 12 years ago 38
5 Ambrosite Body Class Enhanced Ambrosite Body Class Enhanced Enhances the body_class template tag, adding some extra classes to the body (post/page… by ambrosite 200+ ★★★★★★★★★★ 5 (5) 15 years ago 38
7 LH Add Roles to Body Class LH Add Roles to Body Class Adds the currently logged in users role (or roles) to the body class in both the front and… by shawfactor 30+ ★★★★★★★★★★ 5 (1) 4 years ago 31
8 Gerenciador de Códigos de Rastreamento Convr Gerenciador de Códigos de Rastreamento Convr Instale e gerencie códigos de rastreamento e pixels de um jeito fácil e simples. Compatível… by multiversoweb 10+ ★★★★★★★★★★ No reviews 6 years ago 23
9 Background Changer Background Changer Background Changer helps you change very easy and very fast the background color of your… by Ciprian Turcu 10+ ★★★★★★★★★★ No reviews 17 years ago 23
10 CSS Classes For WooCommerce – customize the WooCommerce cart and checkout via CSS CSS Classes For WooCommerce CSS classes depending on the cart to customize the checkout. by Jose Mortellaro 10+ ★★★★★★★★★★ 5 (1) 2 months ago 69
11 Vücut Kitle Endeksi Vücut Kitle Endeksi Cinsiyet, boy ve kilo girilerek; Vücut Yüzey Alanı, Yağsız Vücut Ağırlığı, İdeal Vücut… by sustun 10+ ★★★★★★★★★★ No reviews 16 years ago 31

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
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.