• 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

Customizing WooCommerce pages in Wellness Pro theme

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 › Customizing WooCommerce pages in Wellness Pro theme

This topic is: not resolved

Tagged: body class, product category, WooCommerce

  • This topic has 4 replies, 3 voices, and was last updated 3 years, 9 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 26, 2020 at 2:09 pm #496212
    myminiversum
    Member

    Hi there,

    I would like to change the CSS code (mainly the body class) for my product category pages within Wellness pro theme, as these pages have a different mobile view than the others (wider margin/padding)
    Could you please suggest where on my WP dashboard can I find the relevant code to change?
    Thank you!
    Ramona

    https://www.myminiversum.hu/product-category/keszletkisopres/
    January 26, 2020 at 6:44 pm #496216
    Anita
    Keymaster

    Did a search on Google. Try this.


    Love coffee, chocolate and my Bella!

    January 28, 2020 at 9:45 pm #496286
    Brad Dalton
    Participant

    You can add a body class for woocommerce pages using PHP code in functions.php however it's already added by default which you can view in the source code or using inspect element.

    add_filter( 'body_class', 'wc_product_category_body_class' );
    function wc_product_category_body_class( $classes ) {
    
    if ( is_product_category() ) {
    
    	$classes[] = 'your-custom-class';
    
        }
    	return $classes;
    
    }
    

    You won't need to do this if you want to change the CSS rules on mobile screens.


    Tutorials for StudioPress Themes.

    February 9, 2020 at 2:33 pm #496590
    myminiversum
    Member

    Hi,
    Thanks for you replies!
    I only want to change the view on mobile. I can find the difference in the code looking at the developer console in Google but I could not find which file exactly I should change and where I can find it...
    Any suggestions on this?
    Thanks a lot again!
    Ramona

    February 9, 2020 at 11:11 pm #496595
    Brad Dalton
    Participant

    Wrap your CSS rules in a media query like this :

    media only screen and (max-width: 840px) {
    
    /* Your CSS Rules */
    
    }
    

    Add the @ sign before media


    Tutorials for StudioPress Themes.

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