Skip to content

Commit

Permalink
Add favicon.ico file and replace default redirect to WP favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
albig committed Jan 29, 2024
1 parent 6716a99 commit e4bdb47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file added assets/img/favicon.ico
Binary file not shown.
9 changes: 9 additions & 0 deletions functions/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
function the_sunflower_theme() {
echo defined( 'SUNFLOWER_THEME' ) ? 'theme--' . SUNFLOWER_THEME : 'theme--default';
}


function sunflower_get_site_icon_url_defaults($url, $size, $blog_id) {

// Update the $url for the /favicon.ico file
return sunflower_parent_or_child( 'assets/img/favicon.ico' );
}
// add the filter
add_filter( "get_site_icon_url", "sunflower_get_site_icon_url_defaults", 10, 3 );

0 comments on commit e4bdb47

Please sign in to comment.