Support » Themes and Templates » Child theme help – Style.css in a sub-folder of a parent theme

  • Hi all,

    I was trying to create a child theme of free theme Elegant.
    But, style.css of Elegant folder says – Style are stored in different directory.

    Now, the file structure is:

    wp-content
       |--->Elegant
           |--->style.css (says styles are in css folder)
           |--->css
                |---> default
                       |-->style.css
       |--->Chiksblog
            |--->style.css

    I have tried with the import line:

    @import url(‘../Elegant/style.css’);
    @import url(‘../Elegant/css/default/style.css’);

    Please suggest, what to do?

Viewing 7 replies - 1 through 7 (of 7 total)
  • These lines are in header.php. Do I need to change something here? Or do I need to import other styles also? Please suggest.

    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/prettyPhoto.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/960.css" type="text/css" media="screen" />
    
    <?php
    	$theme_scheme = get_option(SHORT_NAME . 'theme_scheme');
    	$theme_dir = get_bloginfo("stylesheet_directory");
    
    	if ($theme_scheme == 'Black Style') {
    		echo '<link rel="stylesheet" href="' . $theme_dir . '/css/black/black.css" type="text/css" media="screen" />';
    		echo '<link rel="stylesheet" href="' . $theme_dir . '/css/black/jqueryslidemenu-b.css" type="text/css" media="screen" />';
    	}
    	else {
    		echo '<link rel="stylesheet" href="' . $theme_dir . '/css/default/style.css" type="text/css" media="screen" />';
    		echo '<link rel="stylesheet" href="' . $theme_dir . '/css/default/jqueryslidemenu.css" type="text/css" media="screen" />';
    	}?>

    esmi

    (@esmi)

    Forum Moderator

    Where did you download the parent theme from?

    Elegant theme
    It has different layout options.

    All options of the parent theme are available when child theme is activated..
    Just the styles I’m am missing..

    My motive is not the child theme, but to implement the changes in a separate css file, can I achieve that by creating another css somewhere outside the theme folder and override the properties in that file??

    Can that work?

    esmi

    (@esmi)

    Forum Moderator

    I’m sorry but your chosen theme is not released under GPL.

    License

    Non GPL products are not welcome in the WordPress community. Official WordPress policy states that all plugins and themes that are publicly released are required to adhere to http://wordpress.org/about/gpl/

    Any support requests for non-GPL products are usually ignored, in the interests of supporting the community and its freedoms.

    Thanks Esmi.

    I didn’t know that. I won’t be talking about it here.
    But, before closing this post, can you explain the import rule for this type of theme, which have style.css in a sub-folder of the parent theme.

    esmi

    (@esmi)

    Forum Moderator

    It would depend upon the theme’s folder structure and where the stylesheets are stored. Perhaps this will help: http://www.cssnewbie.com/css-import-rule/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Child theme help – Style.css in a sub-folder of a parent theme’ is closed to new replies.