-
AuthorPosts
-
September 12, 2017 at 6:19 pm #851153
Hi there,
I read a couple of similar threads but didn’t help.
I need to change one property of .avia-section, which is defined under shortcodes.css
I tried to override it from:
– the style.css in the child theme
– the theme options panel
– I even tried to put some CSS in header.php
None of the above worked. Tried with !important too.
I can’t override the property position:static in any way. It only works if I set a background image (but only with the parallax effect active) or a background video. If nothing is set as a background, position don’t get overridden.I’d need help on this ASAP. Thanks in advance
September 12, 2017 at 7:13 pm #851197Hey luca8link,
You can copy enfold/css/shortcodes.css file into your child theme inside /css/ folder and add following code to functions.php file of your child theme
add_action( 'wp_enqueue_scripts', 'wp_change_shortcodescss', 20 ); function wp_change_shortcodescss() { wp_dequeue_style( 'avia-shortcodes' ); wp_enqueue_style( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/css/layout.css' ); }Best regards,
YigitSeptember 12, 2017 at 7:48 pm #851210Thanks for the quick reply Yigit, I was hoping to find a different solution than dequeuing the whole shortcodes.css.
If I do that, it works. But please notice the handle for that CSS is avia-scs, not avia-shortcodes.The proper code, for anyone else who needs it, would be
add_action( 'wp_enqueue_scripts', 'wp_change_shortcodescss', 20 ); function wp_change_shortcodescss() { wp_dequeue_style( 'avia-scs' ); wp_enqueue_style( 'avia-scs-child', get_stylesheet_directory_uri().'/css/shortcodes.css' ); }Best,
LucaSeptember 12, 2017 at 8:10 pm #851219 -
AuthorPosts
- The topic ‘Override shortcodes.css’ is closed to new replies.
