Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please show the child’s functions.php where it enqueues it’s own CSS and the parent and provide a link to the actual site.

    Please share the code for the functions.php file in order to see the problem.

    Thread Starter reti

    (@reti)

    Thanks for the answers. Here you go:

    
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        $parent_style = 'parent-style'; 
        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 ),
            wp_get_theme()->get('Version')
        );
    }
    
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You really don’t need to enqueue the child theme’s CSS as that happens automatically.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two style.css file versions’ is closed to new replies.