Back to Community

How to Fix Common Twenty Nineteen Child Theme Issues

45 threads Sep 10, 2025 ThemeTwenty nineteen

Content

Creating a child theme for the Twenty Nineteen theme is a fundamental practice for making customizations that persist through updates. However, several common issues can arise during setup that prevent the child theme from working correctly. This guide covers the most frequent problems and their solutions, based on community discussions.

Common Problem: CSS Changes Not Taking Effect

A frequently reported issue is that CSS rules added to a Twenty Nineteen child theme's style.css file do not override the parent theme's styles. This often manifests when a user adds a simple rule, like changing an h1 color to green, but sees no change on the front end.

Why This Happens

The primary cause is an incorrect method of enqueuing the parent theme's stylesheet. Many tutorials recommend using the @import rule in the child theme's CSS, which is an outdated method that can cause load order issues and specificity problems. The modern, WordPress-recommended method is to use the wp_enqueue_style() function in the child theme's functions.php file.

Solution: Properly Enqueue Styles

Instead of using @import, add the following code to your child theme's functions.php file. This ensures the parent style is loaded before the child style, allowing your modifications to override the parent theme correctly.

<?php
function my_theme_enqueue_styles() {
    $parent_style = 'twentynineteen-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')
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>

The handle name ('child-style') is arbitrary and does not need to match your folder name; it is simply a unique identifier for the stylesheet.

Common Problem: Logo Disappears When Child Theme is Activated

Some users have reported that activating a child theme, even an empty one, causes the site's logo to vanish.

Why This Happens

This is typically a caching issue. When you switch themes, your browser or any active caching plugins may serve an old, cached version of the site that doesn't reflect the new theme's setup. The logo is often added through the WordPress Customizer, and its display is controlled by theme support functions that need to be properly inherited.

Solution: Clear Your Cache

The first and most crucial step is to clear all caching layers:

  1. Browser Cache: Hard refresh your browser (Ctrl+F5 or Cmd+Shift+R).
  2. Plugin Cache: Clear any cache generated by plugins like W3 Total Cache or WP Super Cache.
  3. Server Cache: If you use a hosting provider with server-level caching (e.g., Varnish), clear that cache through your host's control panel or by contacting support.

After clearing the cache, revisit your site. The logo should reappear. If the issue was purely cache-related, no code changes are needed.

Common Problem: Unable to Dequeue a Parent Theme Script

Developers sometimes need to remove a parent theme's JavaScript file, such as touch-keyboard-navigation.js, to resolve conflicts. Simply calling wp_dequeue_script() may not work if not done with the correct hook or priority.

Why This Happens

The script must be dequeued on the same hook where it was enqueued, and often after it has been enqueued. Using a hook that fires too early, like wp_print_scripts, or an incorrect priority can cause the function to fail.

Solution: Dequeue with the Correct Hook and Priority

Use the wp_enqueue_scripts hook with a late priority (a high number) to ensure the parent script has already been enqueued before you try to remove it. You must also use the correct script handle, which can often be found by inspecting the parent theme's functions.php file.

<?php
function project_dequeue_unnecessary_scripts() {
    wp_dequeue_script( 'twentynineteen-touch-navigation' ); // Use the correct handle
    wp_deregister_script( 'twentynineteen-touch-navigation' );
}
add_action( 'wp_enqueue_scripts', 'project_dequeue_unnecessary_scripts', 999 );
?>

Conclusion

Most issues with Twenty Nineteen child themes stem from a few common sources: improper style enqueuing, caching, or incorrect hooks for modifying scripts. By following the solutions outlined above, you can resolve these problems and build a stable foundation for your customizations. For further reading, the official WordPress documentation on child themes is an excellent resource.

Related Support Threads Support