3. Enqueue stylesheet
There are a few things to keep in mind:
- the child theme is loaded before the parent theme.
- everything is hooked to an action with a priority (default is 10) but the ones with the same priority run in the order they were loaded.
- for each handle, only the first call to
wp_enqueue_style()
is relevant (others ignored). - the dependency parameter of
wp_enqueue_style()
affects the order of loading. - without a version number, site visitors will get whatever their browser has cached, instead of the new version.
- using a function to get the theme’s version will return the active theme’s version (child if there is a child).
- the functions named
get_stylesheet
* look for a child theme first and then the parent.