WordPress.org

Support

Support » Multisite » [Resolved] WP Network child theme issue

[Resolved] WP Network child theme issue

  • Hi there,

    I’m having the same problem. I have a WordPress Network that runs fine. If I create a Child theme I can see it in the admin area and activate it. But the CSS from the child style.css is not turning up on the frontpage it just shows its parents theme. It looks like the child css it is not loaded. I sheached in a lot of support forums already but no fix for me yet. Any one a clue?

    Let me know what you want to know on my setup.

    The development website is localy hosted.
    WP 3.6.1

    Theme:
    /themes/letsrefine/
    /themes/letsrefine-child/

    child style.css:

    /*
     Theme Name:     Lets Refine Child
     Theme URI:      http://www.developersdomain.nl/wp-content/themes/letsrefine-child/
     Description:    Lets Refine Child Theme
     Author:         Jacob Christoffels & Bart van der Valk
     Author URI:     http://www.bondjack.nl
     Template:       letsrefine
     Version:        1.0.0
    */
    @import url("../letsrefine/style.css");
    
    /* Theme customization starts here
    -------------------------------------------------------------- */
    
    body {background-color: gray;}
    
    h1 {font-size: 100px !important;}
    
    /* ============ Orange image fill =========== */
    
    /* Sub-menu */
    .sub-menu-container {background-image: url(images/new-color-fill-orange.gif) !important;} 
    
    /* Layout dashboard */
    .dashboard {background-image: url(images/new-color-fill-orange.gif);}
    
    /* Archives */
    .divider {background-image: url(images/new-color-fill-orange.gif);}
    
    /* Recent Post block1 */
    #latest-0 {background-image:url(images/new-color-fill-orange.gif);}
    
    /* social media buttons share */
    .icons-text {background-image:url(images/new-color-fill-orange.gif);}
    
    /* footer */
    .footer-menu-container {background-image: url(images/new-color-fill-orange.gif);}
    
    /* ============ Orange color fill =========== */

    Thx!

Viewing 9 replies - 1 through 9 (of 9 total)
  • View page source. What theme does it think it’s using?

    View page source. What theme does it think it’s using?

    Hi Ipstenu, I don’t see any reference to the child theme in the source code. It looks like it isn’t there at all. But like I said it is active adn selected in the admin area.

    Hi, I’m having the same problem on my site. It seems like the child theme’s style.css file does not update the parent theme’s one.

    esmi

    @esmi

    Forum Moderator

    @ninjadan9: As per the Forum Welcome, please post your own topic.

    @bondjack, is the parent theme activated for that sub-site?

    I found a possible solution. Make sure you have
    <link rel="stylesheet" type="text/css" media="all" href="<?=bloginfo( 'stylesheet_url' ); ?>" />
    in your parent theme’s header.php file. If it says bloginfo('template_url'); then it needs to say bloginfo('stylesheet_url');.

    Hi Ipstenu, I don’t see any reference to the child theme in the source code. It looks like it isn’t there at all. But like I said it is active adn selected in the admin area.

    Deactivate and reactive it?

    I wonder if the parent theme doesn’t allow children. Try making a child theme off TwentyEleven for a test?

    @bondjack, is the parent theme activated for that sub-site?

    Yes it is active.

    I found a possible solution. Make sure you have
    <link rel=”stylesheet” type=”text/css” media=”all” href=”<?=bloginfo( ‘stylesheet_url’ ); ?>” />
    in your parent theme’s header.php file. If it says bloginfo(‘template_url’); then it needs to say bloginfo(‘stylesheet_url’);.

    I use the function.php file to get my css files

    <?php
    define("THEME_DIR", get_template_directory_uri());
    /*--- REMOVE GENERATOR META TAG ---*/
    remove_action('wp_head', 'wp_generator');
    
    // ENQUEUE STYLES
    
    function enqueue_styles() {
    
    	/** REGISTER css/screen.css **/
    	wp_register_style( 'main-style', THEME_DIR . '/style.css', array(), '1', 'all' );
    	wp_enqueue_style( 'main-style' );
    
    	wp_register_style( 'responsiveslides', THEME_DIR . '/stylesheets/responsiveslides.css', array(), '1', 'all' );
    	wp_enqueue_style( 'responsiveslides' );
    
    	wp_register_style( 'skeleton', THEME_DIR . '/stylesheets/skeleton.css', array(), '1', 'all' );
    	wp_enqueue_style( 'skeleton' );
    
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_styles' );

    So I cant chang template_url to stylesheet_url because I dont use this var but you gave me some stuff to think about. I dont use a function.php file in my child theme, I might need to put one there to as the style sheets are loaded there. Ill get back.

    Hi guys, I fixed it.

    I changed the first second line of my functions.php file.
    old:
    define("THEME_DIR", get_template_directory_uri());

    new:
    define("THEME_DIR", get_stylesheet_directory_uri());

    Thx guys for getting me on ther right path!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] WP Network child theme issue’ is closed to new replies.
Skip to toolbar