• 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

What's the Best Way to Change a Theme Specific CSS 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 › What's the Best Way to Change a Theme Specific CSS Class

This topic is: not resolved

Tagged: theme migration

  • This topic has 5 replies, 3 voices, and was last updated 9 years, 9 months ago by Paddy.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 9, 2016 at 3:15 am #180981
    Paddy
    Member

    Hi. When changing themes from WooThemes' Canvas to Genesis, what's the best way to deal with certain Woo specific CSS classes. For example, here's a Button that's originally styled with Woo's woo-sc-button class.

    <a class="woo-sc-button fr" href="http://www.domain.dev/articles/ideas">
    <span>More Ideas</span>
    </a>

    - Here's Chrome's Inspector's results for a.woo-sc-button.fr - http://i.imgur.com/UKaTLw9.png?1
    - The .fr is a simple float: right;
    - i've located a.woo-sc-button in the shortcodes.css file.

    Is it possible to just rename the class and then copy over all the declarations, and if so, is this an ethical/acceptable move? Or is there a better approach?

    Thanks for any suggestions.

    March 9, 2016 at 9:26 am #181011
    Victor Font
    Moderator

    The easiest way it to overrride the WooCommerce CSS in your child theme's style.css. The issue that you will encounter is that the child theme style.css loads in the browser before the WooCommerce css which gives the WooCommerce styles priority. You need to change the load order of the style sheets so the child theme style loads last, then you can override any of the WooCommerce styles. This will help you make the adjustment: 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?

    March 9, 2016 at 12:35 pm #181032
    Brad Dalton
    Participant

    You have several options:

    1. You can change the class manually in the HTML to button

    2. You can add the CSS from Canvas style sheet to your Genesis child themes style sheet.

    3. could try a SQL find and replace to change all instances if the class using phpMyAdmin


    Tutorials for StudioPress Themes.

    March 9, 2016 at 9:50 pm #181092
    Paddy
    Member

    @Victor I'm trying to change away from a Woo Theme rather than deal with a theme vs WooCommerce plugin CSS conflict. Thanks for your insight on theme vs plugin CSS load priorities.


    @Brad
    - please excuse these basic questions ...

    1. "You can change the class manually in the HTML to button" - is 'button' a Genesis CSS class already, or it would need to be defined in style/custom .css?

    2. "You can add the CSS from Canvas style sheet to your Genesis child themes style sheet." - is it allowed/ethical to simply copy the code like this?

    3. "could try a SQL find and replace to change all instances if the class using phpMyAdmin" - would this be able to make changes in custom templates and other files such as home.php? I thought these files are separate from what's in the WP database.

    March 9, 2016 at 10:32 pm #181093
    Brad Dalton
    Participant

    1. The CSS rules for the button class are already included in genesis.

    2. GPL code so there's no problem

    3. You can use a code editor to search find and replace classes in theme files. To find and replace classes in HTML content, you would use a SQL Query in phpMyAdmin to change classes in your database if you have added HTML to your editor which includes your button class.

    Which method you use depends pn how many times you have added button HTML in your content. If its only a handful and you which pages/posts then do it manually.

    If its a large number use method number 2 or 3


    Tutorials for StudioPress Themes.

    March 9, 2016 at 11:17 pm #181095
    Paddy
    Member

    Got it. Thanks a lot Brad. Much appreciated.

  • 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