I am trying to create a child theme. The parent theme has style.css and that's it, and I looked at the function wp_enqueue_style()and it says that you can include dependencies. This means that themes style.csscan be active, and in my child theme, if I specify the same rule in my .css style, it should overwrite it.
But addiction is an array of pens. How to find these descriptors?
wp_enqueue_style( 'mytheme-style', get_stylesheet_directory_uri().'/style.css', array('main_css') );
I tried with this, but it only loads the style. css from the child thread, not from the parent.
Where can I find these descriptors?
EDIT:
I found code for playing descriptors and scripts:
function wpa54064_inspect_scripts() {
global $wp_scripts;
foreach( $wp_scripts->queue as $handle ) :
echo $handle,' ';
endforeach;
}
add_action( 'wp_print_scripts', 'wpa54064_inspect_scripts' );
function wpa54064_inspect_style() {
global $wp_styles;
foreach( $wp_styles->queue as $handle ) :
echo $handle,' ';
endforeach;
}
add_action( 'wp_print_scripts', 'wpa54064_inspect_style' );
But it still does not work as I thought.
source
share