• losrack

    (@carlos-jaramillo)


    Hi,

    I just started building a new site. My phunctions.php on my child is working fine but the style.css is not loading.

    In the meantime I just added a few lines of css right on the theme configurator, it has a css editor, but I prefer to have all my styles on my child’s css.

    Thanks for any info on what’s going on.

    • This topic was modified 4 years, 9 months ago by losrack. Reason: add info

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @carlos-jaramillo

    It looks like your child theme’s CSS file is loading, but it doesn’t actually contain any styles:

    https://masteraudio.es/wp-content/themes/Storefrontchild/style.css?ver=5.4.2

    Also, it looks like your parent theme’s CSS file is loading twice:


    Link to image: https://cdn-std.droplr.net/files/acc_646767/jWYhav

    Please check if you’ve followed the exact steps to load a child theme right here:
    https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    • This reply was modified 4 years, 9 months ago by Senff - a11n.
    Thread Starter losrack

    (@carlos-jaramillo)

    Hi,

    I think I have done something wrong on my functions.php, well here it is:

    <?php
    if ( ! function_exists( 'suffice_child_enqueue_child_styles' ) ) {
    	function Storefrontchild_enqueue_child_styles() {
    	    // loading parent style
    	    wp_register_style(
    	      'parente2-style',
    	      get_template_directory_uri() . '/style.css'
    	    );
    
    	    wp_enqueue_style( 'parente2-style' );
    	    // loading child style
    	    wp_register_style(
    	      'childe2-style',
    	      get_stylesheet_directory_uri() . '/style.css'
    	    );
    	    wp_enqueue_style( 'childe2-style');
    	 }
    }
    add_action( 'wp_enqueue_scripts', 'Storefrontchild_enqueue_child_styles' );
    
    /*Write here your own functions */
    
    /* MY OWN CREDITS */
    /* CREDITS - original function has to be disabled*/
    function storefront_credit() {
    	?>
    	<div class="site-info">
    	<?php echo '?2020 Carlos Jaramillo';?>
    	</div><!-- .site-info -->
    	<?php
    }
    
    /* END SO FAR */
    • This reply was modified 4 years, 9 months ago by losrack. Reason: correction
    • This reply was modified 4 years, 9 months ago by losrack.
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @carlos-jaramillo Unless it’s spam, abuse or something broken in the forums please do not report topics again.

    It is not a means to get faster support, it only gets forum moderators attention and no one else.

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