pippinsplugins / EDD-Starter-Theme

Starter Theme for Easy Digital Downloads
47 stars 13 forks source link

Child Theme Not Loading Right style.css #6

Open bdgeyter opened 11 years ago

bdgeyter commented 11 years ago

I'm trying to build a child theme on your starter-theme. Even when my child theme is activated, it keeps loading only the style.css file from the starter-theme, ignoring the overwritten rules.

My setup for a child theme does work with any other theme (like the standard twentyeleven), so I'm wondering if it is a problem with the current master.

I've tried reinstalling the starter-theme, but this did not resolve the issue either.

bdgeyter commented 11 years ago

After some research, I'm wondering if this definition in your functions.php might be the reason:

if(!defined('EDDS_THEME_URL')) {
      define('EDDS_THEME_URL', get_bloginfo('template_directory'));
}

Looking at the Wordpress Codex:

'template_url' / 'template_directory' - URL of the active theme's directory ('template_directory' was a local path before 2.6; see get_theme_root() and get_template() for hackish alternatives.) Within child themes, both get_bloginfo('template_url') and get_template() will return the parent theme directory. Consider using get_template_directory_uri() instead (for the parent template directory) or get_stylesheet_directory_uri() (for the child template directory).

my guess is you'll need to use the function get_stylesheet_directory_uri() instead.

pippinsplugins commented 11 years ago

Yep, that's the problem. That should be changed to "stylesheet_directory"