0

anyone have any idea what could have caused this?

Thanks

https://www.subscriptionboxaustralia.com/directory/

  • Difficult to debug, it looks like you are using CloudFlare minifications / performance improvement features. Try to disable them and see if depends on it. – Stefano Tombolini Jan 14 at 9:21
  • Could you include your child theme's functions.php? This will help us debug your issue. I have posted an answer below. MY code works also for WordPress 5, I think your child theme is enqueuing your style.css in the wrong order or not at all. – Remzi Cavdar Jan 14 at 10:24
  • My funtions php in child theme <?php function my_theme_enqueue_styles() { 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') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); ?> – user7663911 Jan 18 at 23:47
0

Required (child) Theme Files

Check if your child theme has a

  • style.css
  • functions.php
  • screenshot.png (optional, but will help you differentiate)

Recommended basic functions.php for a child theme

<?php
/**
 * Example child theme Remzi Cavdar
 *
 * @link https://developer.wordpress.org/themes/advanced-topics/child-themes/
 *
 * 
 */


function use_parent_theme_stylesheet() {
    // Use the parent theme's stylesheet
    return get_template_directory_uri() . '/style.css';
}

function child_theme_branding() {

    // Uncomment this if you want versioning in your child theme stylesheet
    // $themeVersion = wp_get_theme()->get('Version');

    // Enqueue our style.css with our own version
    wp_enqueue_style( 'child-theme-branding', get_stylesheet_directory_uri() . '/style.css', array(), null );

}

// Filter get_stylesheet_uri() to return the parent theme's stylesheet
add_filter( 'stylesheet_uri', 'use_parent_theme_stylesheet' );

// Enqueue this theme's scripts and styles (after parent theme)
add_action( 'wp_enqueue_scripts', 'child_theme_branding', PHP_INT_MAX );

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.