I am developing a theme and I wonder if there is a possibility to have a default favicon.

Details: The theme already has support for adding favicon and users can go to

admin->customize->site identity 

and select an image for favicon. Is possible that the theme shows a default favicon in case user still hasn't got to it?

  • 1
    The favicon isn't the theme's business. It should be left to the user to choose based on their needs. – Jacob Peattie Feb 2 '18 at 4:24

You have to change the defualt Site Icon using the Customizer API.

$wp_customize->add_setting( 'site_icon' , array(
    'default'     => YOUR_IMAGE_URL_HERE,
) );

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.