probably easier to locate the favicon and replace it with yours.
it’s in dkret3/library/my-dkret3/library/
and there’s one in dkret3/library/images/
Don’t know why, but you can probably tell which one to replace
Thread Starter
sheddy
(@sheddy)
Thanks, that’ll certainly work until we can figure out the child themes way to do it.
Dkret simply is a full filtered theme. Therefore you can change everything through the use of own filters inside your child themes functions.php.
In dkret3 the favicon is added inside functions.php (line 118):
// add favicon for dkret3
add_action( 'wp_head', 'dkret_add_favicon' );
Wp_head is called inside header.php. Therefore the function “dkret_add_favicon” is added to the header of every page.
You will find the functions of dkret3 inside “dkret3/library/functions”. The function “dkret_add_favicon” is saved inside “custom-template-tags.php” (line 29):
function dkret_add_favicon() {
$favicon = '<link rel="shortcut icon" href="'.THEME_IMAGES.'/favicon.ico" />';
echo apply_filters( 'dkret_favicon', $favicon );
}
Actually this function just adds the html code for the favicon to the head of all pages.
The best practise is to simply overwrite the ‘dkret_favicon’ filter.
Inside your child themes function.php add these small code:
function my_child_favicon() {
echo '<link rel="shortcut icon" href="'.CHILD_THEME_URI.'/library/images/favicon.ico" />';
}
add_filter( 'dkret_favicon', 'my_child_favicon' );
This will actually overwrite the standard markup. Please change the URL if the favicon is not saved inside “my-dkret3/libray/images”.
Thread Starter
sheddy
(@sheddy)
Many thanks for the help and explanation, (and thanks for making the theme and keeping it up-to-date)