Child theme css

Home Forums Best Commerce Child theme css

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #12181

    Hello mate it’s me yet again, I have decided to transfer all changes that have been made to the theme (even before me) to a child theme, now I am facing the following issue I can’t make the child css work. I am using the following code in the functions.php but doesn’t seem to do the trick.

    add_action( 'wp_enqueue_scripts', 'best_commerce_child_enqueue_styles', 11 );
    function best_commerce_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_uri() );
    update_option( 'siteurl', '' );
    update_option( 'home', '' );
     /* This is the edited code for the functions.php of best-commerce-child*/
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    Axle Themes

    Hi @johnnyd

    For child theme style you need to use get_template_directory_uri() and for the parent style, you need to use get_stylesheet_uri().

    You are doing just the opposite.


    Thanks mate, I wouldn’t have thought of that!

    Axle Support

    You are welcome. Happy to help you.

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