• 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

Custom Body Class Lifestyle Pro

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 › Custom Body Class Lifestyle Pro

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 9 years, 9 months ago by jaqkar.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 18, 2016 at 5:20 am #179298
    jaqkar
    Participant

    Hi

    Trying to use the custom body and post classes on a page in Lifestyle Pro. Do I need to add this to my functions.php or not since the child theme has this built in? http://my.studiopress.com/snippets/custom-body-class/

    I added a custom body style on the page and then defined it in my css and tested it but it does not work. This is my css for testing:

    .custom-class {
    border: solid red 100px;
    font-family: 'georgia', arial;
    color: #80000;
    }

    http://www.bodyangelica.co.za/treatments/
    February 18, 2016 at 8:12 am #179306
    Victor Font
    Moderator

    That code snippet with work if you want to replace the current body class in Lifestyle Pro. If you want to add an additional class to the current classes, this is one way to do it:

    add_filter( 'body_class', 'my_body_class' );
    function my_body_class( $classes ) {
    	
    	array_push($classes, 'custom-class');
    	return $classes;
    	
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 18, 2016 at 8:34 am #179307
    jaqkar
    Participant

    Thanks Victor! Now not so sure I am on the right track. I wanted to test with body but now I want to try the post class, trying to target a class on a current page and overriding it with my post class. This is the page: http://www.bodyangelica.co.za/treatments/

    I am trying to hide the Price which is class: mp_product_price-normal

    What I thought I would try is to specify a custom post class and change it using something like:

    .my_custom_class . mp_product_price-normal {
    display: none !important;
    }

    Am I on the right track here?

    February 18, 2016 at 9:07 am #179308
    jaqkar
    Participant

    So I figured out that Marketpress once run with a shortcode on a normal page now suddenly controls the css for that content section through a child stylesheet it uses. Huh?

    When I added the above css to that it worked. Not sure I am loving that it is doing that!

    February 18, 2016 at 10:50 am #179318
    Victor Font
    Moderator

    Maybe this can help, but I'm not so sure: http://victorfont.com/genesis-framework-add-a-custom-css-class-to-elements/

    It's not a good idea to add custom classes to plugins because when the plugin gets updated, your customizations will be overwritten. A better idea is to load your child theme's style sheet after the plugin style sheet, in which case this should help: http://victorfont.com/change-genesis-child-theme-style-sheet-load-order/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 19, 2016 at 5:48 am #179381
    jaqkar
    Participant

    Thanks Victor, will be reading through your post. Will also have a browse and learn, like your site. I managed to create a custom style outside the plugin for Marketpress and now using that. I would rather prefer to be using my own Genesis Theme/Child but it is like Marketpress is controlling the post section and to edit Marketpress page template it has issues with Genesis. I am lost with the Genesis and Marketpress not playing nice because to create a new page template for Marketpress using Genesis loop is where I am not sure what to do.

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

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