Support » Theme: evolve » Evolve child enqueue by child function

  • Confusion with enqueue parent stylesheet by child function.

    If I set the child function to enqueue Evolve parent style the Theme get broken.

    If I only enqueue the child-style it works.
    Is this correct?

    add_action( 'wp_enqueue_scripts', 'enqueue_evolve_child' );
    function enqueue_evolve_child() {
       
        //wp_deregister_style( 'evolve-style');
        //wp_register_style('evolve-style', get_template_directory_uri(). '/style.css'); 
       
        $parent_style = 'evolve-style';  
    
    //wp_enqueue_style('evolve-css', get_template_directory_uri() . '/style.css' );
    
    wp_enqueue_style('evolve-child-css', get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
            wp_get_theme()->get('Version')
    );
    wp_enqueue_script('evolve-child-js', get_stylesheet_directory_uri() . '/js/toogle-searchform.js', array( 'jquery' ), null, true );
    }

    Thanks for any input.

    Greetings
    Deexperte

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.