PluginSift
PluginsThemesCompare
Directory
  • Plugins
  • Themes
  • Compare Plugins
Plugin Comparisons
  • SEO
  • Security
  • Ecommerce
  • Page Builders
  • Caching
  • Backup
  • Forms
  • Analytics
Resources
  • About
  • Contact
  • llms.txt

© 2026 PluginSift. Data sourced from WordPress.org. · [email protected]

  1. Home
  2. Plugins
  3. CSS
  4. CSS Page Ancestors
CSS Page Ancestors icon

CSS Page Ancestors

Add ancestors classes in your body_class to CSS control ALL the anchestors of your page.

By giannisg·CSS·Free
00
·0 active installs·Updated 8 years ago
DownloadCompare

As of April 2026, CSS Page Ancestors is a WordPress css plugin with 0 active installations and a 0/5 rating0. It has been downloaded 1.1K+ times in total. Requires WordPress 3.3+ and PHP 5.6+. Available on WordPress.org since 2017. Last updated 8 years ago — may have compatibility concerns. Top alternative: WPCode – Insert Headers and Footers +….

0/5Rating
0active installs
1.1K+total downloads
9 yearssince 2017

Overview

Please, keep in mind that THIS IS IN BETA. I’m relying to your feedback, positive or with suggestions, to release it out of beta

This plugin will give you the extra class you need in your tag of ALL (and not just one) of the anchestors of a page in WordPress.

This way you will be able to color a certain section of a site, based on the root’s ancestor – no matter how deep is the page (WordPress does this only for the direct father of a page)

Also, the printed class names are ancestor-[slug] and ancestor-id-[id]. This way, you can use it with your page slug (very conviniate if you move sites between instalations where id can change) and id (useful if you use a non-latin site, and slug can’t be used in css)

–

So, let’s imagine you have this tree of pages…

Read full description on WordPress.org

Screenshots

Ratings & Reviews

00 reviews
5 ★
0
4 ★
0
3 ★
0
2 ★
0
1 ★
0

Compatibility

WordPress3.3+ requiredTested up to 4.8.28
PHP5.6+ required

Top Alternatives to CSS Page Ancestors

WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager icon
WPCode – Insert Headers and Footers +…
4.93.0M+ installsUpdated 2 weeks ago
ViewCompare
Code Snippets icon
Code Snippets
4.71.0M+ installsUpdated 1 month ago
ViewCompare
Simple Custom CSS Plugin icon
Simple Custom CSS Plugin
4.7100K+ installsUpdated 1 year ago
ViewCompare
Widget CSS Classes icon
Widget CSS Classes
4.990K+ installsUpdated 1 year ago
ViewCompare
Simple CSS icon
Simple CSS
4.980K+ installsUpdated 6 months ago
ViewCompare
View all css plugins →

Frequently Asked Questions

Changelog

0.95

Removed the manual installation of the plugin, and converted it to a filter, so the users won’t touch their theme. (Thanks WordPress Plugin Directory Team for the tip!)

View full changelog on WordPress.org

Contributors

giannisggiannisg
Plugin Info
Version
0.95
Last Updated
Nov 19, 2017
WP Requires
3.3+
Tested Up To
4.8.28
PHP Requires
5.6+
Active Installs
0
Downloads
1.1K+
Added
Nov 19, 2017
Business
Free

Tags

cssclassfatherancestorancestors

Developer

G
giannisg
1 plugins0
View all plugins →

Quick Compare

CSS Page Ancestors vs WPCode – Insert Headers and Footers +…→CSS Page Ancestors vs Code Snippets→CSS Page Ancestors vs Simple Custom CSS Plugin→

Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.