• 48

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Mysterious Divi child theme css being ignored

this is driving me insane.

child theme .css is loaded, after the parent style, but the CSS is just not applied / doesn't override, I've searched around and I see several other people complaining about this.

Enqueing the style or even adding priority to it does not solve it.

Adding the same CSS via the theme customizer, the CSS is actually applied, so the CSS itself is not the problem here.

What can I do more?!

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]

Have you included a dependency in the wp_enqueue_script()?

/**  * Proper way to enqueue scripts and styles     Example...  */ function wpdocs_theme_name_scripts() {     wp_enqueue_style(         'stylesheet-name', // it will append '-css' in your source         get_template_directory_uri() . '/css/stylesheet-name.css',         array('parent-style'), // dependants (reliable on other stylesheet)         'null',  // version, null or version number (1.0.1 etc)         'all' // media     ); } add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' ); 

Note: if you have a version number in your enqueue then the cache could stop it from loading. Some people use date() to change the value each time it refreshes...

see demo
  • 19
Reply Report

I finally found an enque setting that solves it,

function my_theme_enqueue_styles() {   wp_register_style(      'child-style',      get_stylesheet_directory_uri() . '/style.css',      array(),      filemtime( get_stylesheet_directory() . '/style.css' )    );    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );   wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); 

apparently what made a difference for me is the "array('parent-style')" value in the function atributes, must investigate it further but this was the only thing that solved it.

  • 15
Reply Report