Enque reponsive child style for mobile display
-
Hi Everyone,
first thanks to the developers for this great theme. I just started working with it a little bit ago and so far really like it.
There is one thing I’m having a bit of trouble with at the moment and thats how to properly include the child themes ‘responsive.css’ – afte the parent themes responsive.css.
I created a child theme in the folder ‘accesspress-lite-child’ (all according to wordpress instructions) and in my
functions.php
i have tried it like this:function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'parent-responsive', get_template_directory_uri() . '/css/responsive.css' ); wp_enqueue_style( 'child-responsive', get_stylesheet_directory_uri() . '/css/responsive.css', array( 'parent-responsive')); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
This doesnt work completely – I now load the parent responsive css file twice – once with the id ‘parent-responsive’, then my css is loaded and at the end as the last .css file this one is loaded:
<link rel=’stylesheet’ id=’accesspresslite-responsive-css’ href=’https://dev.myurl.com/wp-content/themes/accesspress-lite/css/responsive.css?ver=4.3.1′ type=’text/css’ media=’all’ />How can do I load my responsive css after this one?
Thanks for any ideas!
- The topic ‘Enque reponsive child style for mobile display’ is closed to new replies.