• Resolved cheryanne

    (@cheryanne)


    Hi there,

    I have a fair amount of code in Hueman’s Customizer Additional CSS that is styling the template and several of the plugins I’m using.

    My question is: Which is the better or preferred option?

    Leave the CSS code where it is (Additional CSS) or copy and paste it in the child theme’s style.css?

    Thanks,
    Chery.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Serafino

    (@seraph63)

    Hi cheryanne,

    If your css file were stored into parent theme I think would be better leave the CSS code where it is.

    You can load more then one css file using WordPress ‘wp_enqueue_scripts’, below an example:

    – Open your functions.php file (the one located into your child-theme)
    – Add a snippet code like to the below example:

    add_action( 'wp_enqueue_scripts', 'myAddedCssFiles' );
    function myAddedCssFiles() {
    	wp_enqueue_style(
    		'1AddedCss', get_template_directory_uri() . '/your-first-css-file.css', array( $parentStyle ), wp_get_theme()->get('Version') );
    		'2AddedCss', get_template_directory_uri() . '/your-second-css-file.css', array( $parentStyle ), wp_get_theme()->get('Version') );
    		/* copy and paste as many times as your css files 
    		....
    		....
    		*/
    		'lastAddedCss', get_template_directory_uri() . '/last-css-file.css', array( $parentStyle ), wp_get_theme()->get('Version') );
    	}

    I hope I was helpful
    Serafino

    • This reply was modified 6 years, 7 months ago by Serafino.
    • This reply was modified 6 years, 7 months ago by Serafino.
    Thread Starter cheryanne

    (@cheryanne)

    Thanks for that, Serafino. Much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Additional CSS or child theme style.css’ is closed to new replies.