• 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 Create Color Style Options for a child theme demo

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 Create Color Style Options for a child theme demo

This topic is: not resolved

Tagged: child theme, color, demo, Style Options

  • This topic has 4 replies, 3 voices, and was last updated 8 years, 11 months ago by Anita.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 21, 2014 at 1:35 pm #101704
    Astoria
    Member

    Hello everybody,
    I'm working on my first child theme and I would like to incorporate a Color Style Option. Any suggestion, tutorial is much appreciated.

    Thank you so much!

    April 21, 2014 at 1:48 pm #101706
    Sachin Verma
    Member

    I guess this is what you are looking for.

    http://www.carriedils.com/body-class-querystring/


    Wait! Do you want someone to fix your Genesis issues? Join the Happy Client Club starting $30/month. 🙂

    April 21, 2014 at 3:10 pm #101719
    Astoria
    Member

    Thank you very much Sachin,
    just a clarification: I have to add this PHP file to the template?

    string-body-class.php

    <?php //remove opening tag
     
    add_filter('body_class', 'string_body_class');
    function string_body_class( $classes ) {
    	if ( isset( $_GET['color'] ) ) :
    		$classes[] = 'theme-prefix-' . sanitize_html_class( $_GET['color'] );
    	endif;
     
    	return $classes;
    }
    April 21, 2014 at 7:56 pm #101783
    Astoria
    Member

    Can anyone kindly please gave me a guide on how correctly do the color style option for a child theme, Please!

    Best Regards-

    April 21, 2014 at 8:34 pm #101790
    Anita
    Keymaster

    Log in to your my.studiopress.com member area, then browse to this link entitled "How to Create Color Style Options."


    Love coffee, chocolate and my Bella!

  • 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