You’ll need to post the relevant code in order for us to help you.
You’ll probably do fine if you use a full URL path.
Thread Starter
tiki16
(@tiki16)
This is your problem:
<?php echo get_template_directory_uri(); ?>
You’re telling WordPress to look in the Template directory – i.e. your Parent Theme directory – for the logo.
Change it to this instead:
<?php echo get_stylesheet_directory_uri(); ?>
Thread Starter
tiki16
(@tiki16)
How is this function call able to distinguish between parent and child theme? get_stylesheet_directory_uri()
thanks for the help.
The stylesheet directory is the Child Theme. The stylesheet directory is the directory that holds the stylesheet for the currently active Theme. So, if you have a Child Theme active, get_stylesheet_dierctory_uri() will refer to the Child Theme.
In the case of a Child/Parent relationship, get_template_directory_uri() will refer to the Parent Theme, based on the Template: parent-theme header tag included in the Child Theme’s style.css file.
In the case of a stand-alone Theme, get_stylesheet_directory_uri() and get_template_directory_uri() will always refer to the same directory.
Thread Starter
tiki16
(@tiki16)
Hi Chip, If I am using my own child theme css to override the parent style.css, how do i override styles from different directories within the parent theme? thanks