widecss is forcing font to Arial for submenu items

Latest Reply from dejudicibus at 2016-02-29 07:59:10 Solution
I just installed the MiddleEarth theme, and I created a child theme to customize it without changing the original code.

There are problems with CSS, anyway. In fact, it looks like wide.css is overriding the child theme and there is no way by using functions.php to avoid that. In fact, several CSS are included at the bottom oh the page header by library.php. In wide.css the main menu subitems are rendered by Arial (!important). No way to change that by using the child theme stylesheet.

Why? It does not look the best way to enqueue stylesheets in a theme. Any hint to fix that without changing your code?

Thank you in advance.
I fixed it by adding the following code to functions.php in my child theme:

function lln_enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style') );
add_action( 'wp_enqueue_scripts', 'lln_enqueue_parent_styles', PHP_INT_MAX );

Leave a reply

Add codeAdd image