AI-powered Classified ads & Business Directory plugin for WordPress to build classifieds, listings, real e...
Enhances the body_class template tag, adding some extra classes to the body (post/page slugs, post categories, and archive parent categories) useful i …
Ambrosite Body Class Enhanced is a WordPress plugin that adds extra classes to the body_class template tag for better categorisation and styling. It provides additional classes for single posts, pages, and category archives, including support for custom taxonomies and multisite installations.
This plugin is useful for developers and site owners who want to enhance the body classes for better control over CSS styling and layout. It can help in distinguishing between different categories and taxonomies, making it easier to apply specific styles based on the content type.
Best for: This plugin suits developers and site owners looking to enhance their site's body classes for better styling control.
What it does well
Where it falls short
Ambrosite Body Class Enhanced offers specific functionality for customising body classes but may require caution due to its age and compatibility concerns.
ambrosite's own description of Ambrosite Body Class Enhanced, lightly tidied.
When activated, this plugin causes the body_class template tag to output five additional classes.
On single posts (is_single) :
postname-[permalink slug]
single-[category slug]
parent-[parent category slug] (all parent and grandparent categories in a hierarchy of any depth)
On pages (is_page) :
pagename-[permalink slug]
On category archives (is_archive and is_category) :
parent-category-[parent category slug] (all parent and grandparent categories in a hierarchy of any depth)
As of version 1.3, the plugin now supports custom hierarchical taxonomies. The new body classes take the following form:
On single posts (is_single) :
single-[taxonomy]-[term slug]
parent-[taxonomy]-[parent term slug] (all parent and grandparent terms in a hierarchy of any depth)
On taxonomy archives (is_archive and is_tax) :
parent-term-[parent term slug] (all parent and grandparent terms in a hierarchy of any depth)
For single posts, the taxonomy name is included in the class name, because I felt it was important to be able to distinguish between taxonomies in cases where a post is assigned to more than one custom taxonomy, and when the same term might appear in two or more taxonomies. For example, suppose you had a real estate site with property listings in New York City, and you had two custom taxonomies defined: City and State. Then the classes would look like this:
single-city-new-york single-state-new-york
As of version 1.3, the plugin now supports multisite installations. If a multisite install is detected, the plugin will output the follow additional body class on every page of the site:
site-[site ID]
If you have a post titled “Top 10 Decorating Ideas”, in category “Christmas”, with a parent category of “Holidays” and a grandparent category of “Calendar”, the additional body classes will be as follows:
postname-top-10-decorating-ideas single-christmas parent-holidays parent-calendar
Other plugins for property listings.
AI-powered Classified ads & Business Directory plugin for WordPress to build classifieds, listings, real e...
A simple yet powerful plugin to create a business directory, job board, real estate, classifieds, or basically...
Building a property website? Property Hive has everything you need to get started, and so much more.
Fast. Flexible. Forward-thinking solution for real estate agents using WordPress. Built for scale, listing man...
WOLF (formerly WPBE) - a WordPress plugin for managing posts, pages, and custom types easily. Perfect for real...
Build your Directory portal, demos for Real Estate Agency and Car Dealership included