Favicon Network Enabled – But How to NOT Show For Sites/Themes With a Favicon Already Defined?

Hi there!

We’ve got Ultimated Branding network enabled on a WordPress multisite with various sub-sites. The Favicon module is enabled, and it’s correctly showing the default Favicon for all the sites in the multisite.

However, some sites already have their own favicon defined via their theme. I.e. Elegant Themes provides support for adding a Favicon.

In that case, the Favicon entry from Ultimate Branding AND from the Elegant Theme are both written to the page header… first Ultimate Branding, then a few lines lower down, the Elegant Themes favicon entry.

But the Favicon displayed in the browser is still the Ultimate Branding one.

So… how can I disable/unload the Ultimate Branding favicon display for sites that already have a Favicon defined?

i.e. via the Elegant Themes. See the screenshot under “ePanel” here: http://www.elegantthemes.com/gallery/divi/tutorial-epanel.html

Thanks!

  • Tyler Postle
    • Recruit

    Hey Jennifer,

    Hope you’re doing well today and thanks for your question!

    I am going to call in one of our SLS(coding experts) on this, as it would only be possible with additional customizations to the plugin. It looks like this feature gets a requested a fair amount and would be very useful!

    Keep in mind that SLS staff take a little bit longer because they deal with more complex questions. We will see soon what SLS has to say on this :slight_smile:

    In the meantime, let us know if you have any further questions!

    All the best,

    Tyler

    PS. I noticed you are using an out-dated version of UB, you can upgrade now as we are on 1.8.0.1 :slight_smile:

  • Jorge
    • HummingBird

    I just found myself this issue, and was headed to post about it.

    Our team noticed something, that might be helpful:

    – If we clear the cache, it loads the proper favicon for a while. And when you close and go to a different area (we were able to reproduce it by going in and out of the Site’s Dashboard) you get the network default one.

  • Jennifer
    • The Incredible Code Injector

    Hey guys, just following up on this…

    Here’s also an update – we’re actually seeing this same problem with both the Elegant Themes AND with the StudioPress Genesis Themes.

    Basically the Ultimate Branding favicon line is displayed in the header RIGHT BEFORE either the Elegant Themes favicon line AND the Genesis themes favicon line.

    I am thinking maybe this could be fixed by checking for the presence of a “favicon” loaded before Ultimate Branding writes the favicon line to the header…

    OR – if the Ultimate Branding favicon line could be loaded a bit later on in the header, that may be the simplest fix?

    I’m not sure if this would work, but it would be an easier fix – and from what I’ve seen, the browser seems to consistently show the FIRST favicon in the header

    Here again is the Elegant Themes documentation for their “ePanel” where they support adding a Favicon: (See the screenshot under “ePanel” here): http://www.elegantthemes.com/gallery/divi/tutorial-epanel.html

    And here’s the Genesis plugin for adding a Favicon, just for reference:

    https://wordpress.org/plugins/genesis-favicon-uploader/

    Thanks!

  • Jennifer
    • The Incredible Code Injector

    Hey Michelle.

    Just thinking on this some more… the ideal fix would be for the Favicon Ultimate Branding component to check for the existence of a favicon line already in the header (whether added by a theme, a plugin, or even some filter), and only display it’s line as backup if none is found… if that’s possible.

  • Hoang Ngo
    • The Green Incsub

    Hi @Jennifer,

    I hope you are well today.

    In the file /ultimate-branding/ultimate-branding-files/modules/favicons.php line 42-44, you will see the code like that

    add_action('admin_head', array(&$this, 'admin_head'));
    add_action('admin_head', array(&$this, 'global_head'));
    add_action('wp_head', array(&$this, 'global_head'));

    Please change it too

    add_action('admin_head', array(&$this, 'admin_head'), 50);
    add_action('admin_head', array(&$this, 'global_head'), 50);
    add_action('wp_head', array(&$this, 'global_head'), 50);

    This will make the favicon render below the others, if this still not help, I will need to check your theme code to getting the right priority.

    Please give it a try and let us update.

    Best regards,

    Hoang Ngo

  • Jennifer
    • The Incredible Code Injector

    Hi Hoang!

    Thanks for sending this!

    Unfortunately it didn’t solve the problem… Here’s what I found:

    I tested both WITH and WITHOUT the above code change in several browsers (OSX Chrome/Firefox and Windows Chrome/Firefox/Internet Explorer).

    What I’m seeing is an inconsistent behavior. What seems to happen is when there are TWO favicon declarations, some browsers show the first, others show the second.

    The desired favicon can work on Firefox and Chrome on Windows, but the default one shows in IE and OSX Chrome instead. and vice versa…

    Is there any way in the plugin to check if there is another favicon declaration already made in the header?

    That way it could display it’s favicon declaration only if there are no other ones found.

    Thanks!

  • Hoang Ngo
    • The Green Incsub

    @Jennifer,

    Actually, we only need to comment out the favicon link in your theme files, and let UB do it’s job to output.

    This way have a limit is you will need to re-update the file for remove the favicon each time you update the theme. Let’s me check your theme and find out does it have any hook/filter for prevent the favicon output. Can you please send the theme to me via

    – Mark to my attention – ATTN: Hoang Ngo

    – Link back to this thread

    -You can upload the theme to any host, and send the link here

    – Include any relevant URLS for your site

    On the contact form, select “I have a different question”, this ensures it comes through and gets assigned to me.

    I’m sorry for this inconvenience and many thanks for your patience.

    Best regards,

    Hoang Ngo

  • Mike D
    • Syntax Hero

    I think rather than Jennifer modifying her theme file, the developers should be taking her suggestion and make the plugin do the work otherwise it doesn’t really live up to its name, Ultimate Branding.

    I was surprised this plugin made all sub sites use a single favicon, which already happens by default. I was under the impression that I would be able to customize each sub sites favicon to Brand it properly.

  • Jennifer
    • The Incredible Code Injector

    Exactly, that was an unworkable solution for us…

    With a multisite hosting hundreds of blogs, you can’t and shouldn’t be editing theme files to customize something like this for one site.

    Hopefully Ultimate Branding will eventually allow the setting of an override favicon at the site-level, so individual sites can CHOOSE to display THEIR favicon rather than the one already set at the network level.

  • Tyler Postle
    • Recruit

    Hey Ocean and Jennifer,

    Thanks for your further feedback here!

    Ultimate Branding when network activated, most changes will affect the entire network, for site by site branding you can always activate it on a site by site basis.

    With that said, I do think the ability to override the network favicon should be here – I’ll mark it as a feature request so the developer is notified :slight_smile:

    Hope you have a great rest of your day!

    All the best,

    Tyler

  • Mike D
    • Syntax Hero

    So are there two very different uses for this plugin?

    From what you said it suggests that when Network Activated all sites should fall under one brand and if it’s Site Activated then each site admin uses their own branding. But not both at the same time.

    I haven’t tried using it individually, I assumed it was a Network Admin plugin only.

    Maybe that’s the solution for Jennifer, each site admin has to brand their own site. Although it would be great if the network admin could create a master brand AND the site admins have the option to override that. It appears we can currently do one or the other but not both at the same time.

  • Anang
    • New Recruit

    Hi Peter

    You can set UltimateBranding to have global favicon, or set per subsite when you activated it by network. See screenshot to see this options :slight_smile:

    Best Regards

    [attachments are only viewable by logged-in members]