Support » Fixing WordPress » udating child theme not working

  • Hi there,

    I am trying to update a child theme but it’s not working.

    I am trying to update a file in directory /inc/hook/header.php in my child theme, but it’s not working. Do I have to do something else as it’s in an /inc and /hooks directory?

    Thank you.

    • This topic was modified 2 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi 🙂

    Thanks for posting.

    If possible, please, can you share a link to a page with the problem so I can inspect the specific CSS rule you’re having trouble with and take a look at the file setup live. Everything above looks normal so it’ll be helpful to take a look at a specific customisation you’re having a trouble with.

    Thread Starter thetoolman123

    (@thetoolman123)

    Hi,

    Its on a local server at the moment.

    Is there anything I should be doing differently? My CSS updates fine in the child theme, but the PHP files do not

    Have you also enqueued child theme’s css?

    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
     
        $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
     
        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')
        );
    } 

    For more: https://developer.wordpress.org/themes/advanced-topics/child-themes/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘udating child theme not working’ is closed to new replies.