Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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

    #851197

    Hey 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,
    Yigit

    #851210

    Thanks 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,
    Luca

    #851219

    Hey Luca,

    Thanks for pointing that out and sharing :)
    Let us know if you have any other questions or issues!

    Regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Override shortcodes.css’ is closed to new replies.