• 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

How to add a custom body heading class?

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 › How to add a custom body heading class?

This topic is: resolved

Tagged: body, css, font, heading

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 4 months ago by photastic.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 9, 2013 at 1:02 pm #61560
    MM
    Member

    Hi, I'm trying to add a custom body class as a few page body css text needs are different

    I'd like the visual post editor to show up something like

    body1 (normal used across site)
    body2 (custom, occassional use)

    Is there a simple way here, or any recommended code / tutorials? Thanks!

    September 9, 2013 at 1:24 pm #61564
    photastic
    Member

    you can target the body of a specific page like this :

    body.home { css for homepage }
    body.page-id-9 { css for page with id 9 }

    easiest way to find the id of a page is by going to the pagesource and check the class that's in the opening body tag...
    Looks a bit like this :

    <body class="page page-id-9 page-template-default logged-in admin-bar no-customize-support content-sidebar windows chrome override" itemscope="itemscope" itemtype="http://schema.org/WebPage"><div class="site-container">


    Trying to craft webstuff at Photastic Webdesign
    Learning Genesis by solving unanswered topics

    September 9, 2013 at 2:39 pm #61573
    MM
    Member

    Legend, thanks for that @photastic. Worked perfectly.

    September 9, 2013 at 2:45 pm #61574
    photastic
    Member

    Glad I could help 🙂


    Trying to craft webstuff at Photastic Webdesign
    Learning Genesis by solving unanswered topics

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 2023 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