Custom favicon is not working for one of the sub-sites

There's an Ultimate Branding installed on Multisite and the Custom Multisite Favicons module is active and configured.

It's working but not for all of the subsites. The sub-site are on additional domain (added via Multi-Domains). See chat for details, please.

    Panos

    Hey there Laurent_C ,

    Could you please try adding the following in mu-plugin:

    add_filter( 'get_site_icon_url', function(  $url, $size, $blog_id  ){
    
    	$ub_favicons = new ub_favicons;
    
    	$allowed_to_override = (int) ub_get_option( 'ub_favicons_override_site_icon', ! function_exists( 'has_site_icon' ) );
    	if ( ! $allowed_to_override ) {
    		return $url;
    	}
    	$blog_id = empty( $blog_id ) ? get_current_blog_id() : $blog_id;
    	return ub_favicons::get_favicon( $blog_id );
    
    }, 999, 3 );

    or this:

    add_action( 'wp_head', function(){
    
    	$favicon_dir = ub_get_option( 'ub_favicon_dir', false );
    	$favicon = ub_get_option( 'ub_favicon', false );
    	if ( $favicon_dir && file_exists( $favicon_dir ) || $favicon ) {
    		echo '<link rel="shortcut icon" href="' . ub_favicons::get_favicon( get_current_blog_id() ) . '" />';
    	}
    
    }, 10 );

    and let us know how it goes?

    I recommend to use a mu-plugin for this since in a multisite you may be using different themes for each sub-sites. If yo uare not familiar with mu-plugin, create a php file in wp-content/wp-mu-plugins (if it doesn't exist, create a new folder and name it mu-plugins ), and in that file insert the opening tag (<?php), add a new line and then paste the code snippet. You can read more about them here: https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Cheers!