Proper Way To Load Wordpress Parent Stylesheet

Posted By Weston Ganger

<p>You shouldnt be using the @import directive in your stylesheet</p>
<p>It slows things down and can cause some issues for media queries etc.</p>
<p>Instead you should add it to your functions.php file of your child theme:</p>

function yourFunctionName(){<br />  wp_enqueue_style('themeNameParentStyle', get_template_directory_uri*() . '/style.css', array(), 'all');<br />}<br />add_action('wp_enqueue_scripts','yourFunctionName');

Article Topic:Software Development - Wordpress

Date:April 30, 2014