WordPress.org

Ready to get started?Download WordPress

Forums

Child theme help - Style.css in a sub-folder of a parent theme (8 posts)

  1. ak.singla
    Member
    Posted 1 year ago #

    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?

  2. ak.singla
    Member
    Posted 1 year ago #

    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" />';
    	}?>
  3. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Where did you download the parent theme from?

  4. ak.singla
    Member
    Posted 1 year ago #

    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..

  5. ak.singla
    Member
    Posted 1 year ago #

    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?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

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

    http://www.moonthemes.com/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.

  7. ak.singla
    Member
    Posted 1 year ago #

    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.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Topic