How to Create Color Style Options for a child theme demo

Community Forums Forums Design Tips and Tricks How to Create Color Style Options for a child theme demo

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  anitac 3 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #101704

    Astoria
    Member
    Post count: 3

    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!

    #101706

    Sachin Verma
    Member
    Post count: 31

    I guess this is what you are looking for.

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


    Genesis child themes, websites and services.
    My site //Bitdoz.com Follow me on //Twitter

    #101719

    Astoria
    Member
    Post count: 3

    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;
    }
    #101783

    Astoria
    Member
    Post count: 3

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

    Best Regards-

    #101790

    anitac
    Participant
    Post count: 7062

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


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.