WordPress OSINT, maintenance or security needs? Reach out!
TLDWP

Plugin: wp247-body-classes (Used by 6 domains)

WP247 Body Classes

👤 wescleveland 📦 v2.2.0

Add unique classes to the body tag for easy styling based on post attributes (post type, slug, and ID) and various WordPress “is” functions:

  • wp_is_mobile()
  • is_home()
  • is_front_page()
  • is_blog()
  • is_admin()
  • is_admin_bar_showing()
  • is_404()
  • is_super_admin()
  • is_user_logged_in()
  • is_search()
  • is_archive()
  • is_author()
  • is_category()
  • is_tag()
  • is_tax()
  • is_date()
  • is_year()
  • is_month()
  • is_day()
  • is_time()
  • is_single()
  • is_sticky()
  • $post->post_type
  • $post->name
  • $post->ID
  • wp_get_post_categories() (Page/Post Categories)
  • wp_get_post_tags() (Page/Post Tags)
  • $user->nicename
  • $user->id
  • $user->roles
  • $user->allcaps
  • $archive->slug (e.g. Category slug, Tag slug, etc.)
  • $archive->id (e.g. Category id, Tag id, etc.)

Add post specific classes to the body tag in the post editor. Use any class name you want to uniquely style an individual post or a set of posts.

Add classes based on user scrolling through the page. You can check things like:

  • is-scroll-top (at the top of the page – synonym for is-not-scroll)
  • is-not-scroll-top (not at the top of the page – synonym for is-scroll)
  • is-scroll (not at the top of the page – synonym for is-not-scroll-top)
  • is-not-scroll (at the top of the page – synonym for is-scroll-top)
  • is-scroll-top-px (has not reached the scroll start value for scroll measurement by pixels)
  • is-scroll-top-vh (has not reached the scroll start value for scroll measurement by viewport height)
  • is-scroll-top-dh (has not reached the scroll start value for scroll measurement by document height)
  • is-scroll-10-px (scrolled down 10 pixels)
  • is-scroll-8-vh (scrolled down 8% of the viewport height)
  • is-scroll-5-dh (scrolled down 5% of the document height)
  • is-scroll-mid-px (has reached the scroll start value but not the scroll limit for scroll measurement by pixels)
  • is-scroll-mid-vh (has reached the scroll start value but not the scroll limit for scroll measurement by viewport height)
  • is-scroll-mid-vh (has reached the scroll start value but not the scroll limit for scroll measurement by document height)
  • is-scroll-max-px (has reached the scroll limit for scroll measurement by pixels)
  • is-scroll-max-vh (has reached the scroll limit for scroll measurement by percent of viewport height)
  • is-scroll-max-dh (has reached the scroll limit for scroll measurement by percent of document height)

Add classes based on the results from mobiledetect.net’s Mobile_Detect script. This script parses the value passed by the browser in the HTTP_USER_AGENT string. Consequently, mobile detection is more of an art than a science and, unfortunately, is not perfect. You can check things like:

  • is-mobile
  • is-tablet
  • is-phone
  • Mobile Operating System
  • Mobile Browser
  • Type of tablet
  • Type of phone

This plugin adds classes to the html body tag indicating:

  • whether or not the requesting device is a mobile device (.is-mobile or .is-not-mobile)

  • the type of post being viewed (.is-? where ? is the post type (page, post, whetever special post types are defined) ).
    E.g. .is-page or .is-post

  • the slug of the post being viewed (.is-?-! where ? is the post type and ! is the post slug).
    E.g. a post with slug “hello-world’ would have class .is-post-hello-world

  • the ID of the post being viewed (.is-?-# where ? is the post type and # is the post ID).
    E.g. a post with ID “1” would have class .is-page-1

  • whether or not the requested page shows archived results (.is-archive or .is-not-archive)

    If the page being displayed is an archive

    • the type of archive being viewed (.is-? where ? represents the type of archive (author, category, date, tag) )
      E.g. .is-author

    • the slug of the archive being viewed (.is-?-! where ? is the archive type and ! is the archive slug)
      E.g. a category with slug “uncategorized’ would have class .is-category-uncategorized

    • the ID of the archive being viewed (.is-?-# where ? is the archive type and # is the archive ID)
      E.g. a category with ID “1” would have class .is-category-1

  • How far down the page the viewer has scrolled in pixels or as a percentage of viewport height or as a percentage of document height

  • Post specific class(es) that are set in the post editor

Use these classes in your styling to provide a better browsing experience for your viewers.

Custom Body Classes

Create your own Custom Body Classes by adding your PHP code in the “Custom Body Classes” section.

Here’s an example. Not sure why we would want to do it, but suppose we want to do some custom styling when the page is being displayed to someone that can manage WordPress options. We might enter something like:

if (current_user_can('manage_options')) $classes[] = 'user-can-manage-options';

Then we can use the body.user-can-manage-options qualifier in our CSS styling.

Example

Suppose you have a large h1 top margin that you want to eliminate on mobile devices to avoid a lot of white space. After activating the wp247-body-classes plugin and indicating that the .is-mobile class is desired, all you need to do is add this line to your CSS:

body.is-mobile h1 {
margin-top: 0;
}

Suppose you have a sticky header but want to shrink it by dynamically reducing the top and bottom padding from 25px to 5px as the viewer scrolls down the page based on 20 pixel scroll increments up to 80 pixels of scrolling:

Set WP247 Body Classes Scroll setting to “Scroll by Pixel” with a 10 pixel increment and an 80 pixel limit and then add the following to your CSS:

body.is-scroll-20-px header {
padding-top: 20px;
padding-bottom: 20px;
}
body.is-scroll-40-px header {
padding-top: 15px;
padding-bottom: 15px;
}
body.is-scroll-60-px header {
padding-top: 10px;
padding-bottom: 10px;
}
body.is-scroll-max-px header {
padding-top: 5px;
padding-bottom: 5px;
}

DomainExposuresHeadersLast Checked
a*i*a*a*l*s.com (WP 6.8.3) F 2026-04-16 10:47:47
o*m*d*o*.com (WP 6.9.4) F 2026-04-16 02:45:27
c*o*n*f*i*h*.com F 2026-04-10 04:38:36
p*e*i*i*n*e*i*i*e*r*.com 2025-11-09 21:57:57
p*e*i*i*n*e*i*i*e*g*o*p.com 2025-11-09 21:57:57

Top 50 Plugins

Plugin Count
elementor 2,789,135
contact-form-7 2,471,615
elementor-pro 1,559,906
woocommerce 1,315,312
revslider 932,453
js_composer 602,812
jetpack 498,378
wp-rocket 437,073
essential-addons-for-elementor-lite 418,875
header-footer-elementor 365,890
gutenberg-core 355,451
elementskit-lite 343,189
instagram-feed 315,876
google-analytics-for-wordpress 314,854
gravityforms 305,971
google-site-kit 303,591
complianz-gdpr 296,586
cookie-law-info 294,850
wpforms-lite 260,135
sitepress-multilingual-cms 255,720
astra-sites 253,377
bluehost-wordpress-plugin 242,274
litespeed-cache 226,815
gtranslate 184,993
coblocks 178,806
cookie-notice 171,144
gutenberg 162,513
the-events-calendar 149,844
popup-maker 140,867
premium-addons-for-elementor 136,981
astra-addon 135,546
bb-plugin 134,923
mailchimp-for-wp 133,451
LayerSlider 129,828
wp-smushit 128,437
custom-fonts 123,775
creame-whatsapp-me 121,564
tablepress 121,556
pro-elements 119,362
click-to-chat-for-whatsapp 116,841
woocommerce-gateway-stripe 113,321
duracelltomi-google-tag-manager 112,967
cleantalk-spam-protect 109,884
smart-slider-3 107,857
akismet 106,740
pixelyoursite 105,870
megamenu 104,344
fusion-builder 104,001
royal-elementor-addons 103,865
honeypot 103,137

Top 50 Themes

Theme Count
hello-elementor 888,661
astra 746,069
Divi 727,522
pub 236,334
generatepress 167,067
flatsome 166,519
Avada 156,035
h4 148,044
oceanwp 122,214
kadence 108,202
enfold 91,516
salient 88,673
bb-theme 86,870
twentytwentyfour 83,839
blocksy 82,353
twentytwentyfive 81,402
cocoon-master 77,362
betheme 73,265
twentyseventeen 70,438
woodmart 62,594
dt-the7 59,851
neve 52,658
twentytwentyone 45,561
bridge 44,636
swell 41,293
Avada-Child-Theme 39,626
twentytwenty 38,999
lightning 38,469
twentytwentythree 38,077
gox 37,423
bricks 31,646
Impreza 31,532
Newspaper 29,719
twentytwentytwo 29,181
epik-redesign 24,539
extendable 24,013
storefront 23,985
pro 23,872
uncode 23,212
yith-wonder 23,178
twentysixteen 22,756
sydney 21,864
themify-ultra 21,493
twentyfifteen 19,880
Total 19,621
porto 18,181
hestia 17,380
thrive-theme 16,579
yootheme 16,042
jupiter 15,894