CSS Page Ancestors WordPress Plugin | Codefreex Skip to content
CSS Page Ancestors icon

WordPress plugin

CSS Page Ancestors

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

By giannisg
Version
0.95
Last updated
Nov 19, 2017
Tested up to
WordPress 4.8.35
Requires
WP 3.3 · PHP 5.6

Health check

Is CSS Page Ancestors safe to rely on?

Our reading of the public WordPress.org data: maintenance, compatibility, ratings and support.

No update in over a year

Last updated on November 19, 2017. It may not be compatible with current WordPress or PHP, and unfixed issues are a security risk.

Not yet tested with the latest WordPress

Tested up to WordPress 4.8.35. It often still works, but check on staging first.

Requires PHP 5.6 or newer

Check your hosting PHP version before installing. Modern PHP is faster and receives security fixes.

Rank tracker

Where CSS Page Ancestors ranks in WordPress.org search

Its position in WordPress.org plugin search for its tags and name, refreshed weekly so you can see how its visibility changes.

WordPress.org search positions for CSS Page Ancestors
KeywordPositionChangeTrendCurrent #1
ancestor
ancestors
css
father
css page ancestors

Checked against the top 100 WordPress.org search results.

Overview

What CSS Page Ancestors does

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 on your site:

Let’s see this scenario: You want all the pages under ‘Clients’ to have a red background. Now, it’s easy to do that – but only for the ‘Web’, and ‘Print’ pages because WordPress gives you only the fathers in the body classes – in this case, the id of ‘Clients’. ‘Eshops’ and ‘Portfolio’ can also have a red background, but you will have to add a new class in your css with the id of ‘Web’ at…

Description from the author's listing. Read the full listing on WordPress.org

Screenshots

CSS Page Ancestors in action

That's what you expect to see in view source of your page
That's what you expect to see in view source of your page

FAQ

CSS Page Ancestors: questions and answers

What is CSS Page Ancestors?

CSS Page Ancestors is a WordPress plugin by giannisg. Add ancestors classes in your body_class to CSS control ALL the anchestors of your page.

Is CSS Page Ancestors free?

CSS Page Ancestors is listed in the WordPress.org plugin directory, so the version there is free to download and use. Some authors also sell paid add-ons or a premium edition with more features and support.

Is CSS Page Ancestors still maintained?

CSS Page Ancestors was last updated on November 19, 2017. The current version is 0.95. Check the changelog on WordPress.org and test updates on a staging site before applying them to a live site.

What does CSS Page Ancestors require?

CSS Page Ancestors requires WordPress 3.3 or newer and PHP 5.6 or newer. It has been tested up to WordPress 4.8.35.

Can Codefreex set up or customize CSS Page Ancestors?

Yes. Codefreex installs, configures and customizes WordPress plugins including CSS Page Ancestors, fixes conflicts and performance problems, and builds custom features when a plugin does not do exactly what you need. Send your site URL for a free review.

Free expert review

Need CSS Page Ancestors set up, customized or fixed?

Tell us about your site and what you need this plugin to do. A senior WordPress developer replies within one business day with a plan and a quote.

Built this plugin yourself? We help WordPress product teams with development, support load and growth. Talk to us