• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Getting custom body class to work

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Getting custom body class to work

This topic is: not resolved

Tagged: body class, custom

  • This topic has 1 reply, 1 voice, and was last updated 11 years, 1 month ago by Ant2199.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 27, 2015 at 11:56 pm #138818
    Ant2199
    Member

    Hi,

    I am still learning the ropes on CSS and am trying to get a piece of CSS to work on the home page only.

    I want the header.image to not display on the home page only.

    I can get this to happen on all pages using this CSS:

    .header-image .site-title a {
    display: none;
    text-indent: -9999px;
    }

    But I am having a hard time getting it to apply solely to the home page.

    I tried adding a custom body class to the page, using homespecial and then adding .homespecial to the CSS.

    I tried just adding .home to the CSS as well as adding .page-id-6 to the CSS.

    Should I be adding anything different to the custom body class box other than just the name?

    Thanks for looking and helping!

    http://development.rom3rehab.com
    January 28, 2015 at 12:15 am #138820
    Ant2199
    Member

    I figured it out.

    I dropped a space in the CSS so instead of:

    .home .header-image .site-title a {
    display: none;
    text-indent: -9999px;
    }

    I dropped the space after .home, like this:

    .home.header-image .site-title a {
    display: none;
    text-indent: -9999px;
    }

    Works fine.

    Still not sure why I could not get the custom body class box on the page to work right but will figure it out... however I am open to suggestions!

    Thanks,

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble