default favicon for a theme?

I am developing a theme and I wonder if there is a possibility to have a default favicon. Details: The theme already has

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?

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?

Share Improve this question asked Feb 1, 2018 at 18:57 user7432810user7432810 2811 gold badge3 silver badges8 bronze badges 1
  • 1 The favicon isn't the theme's business. It should be left to the user to choose based on their needs. – Jacob Peattie Commented Feb 2, 2018 at 4:24
Add a comment  | 

1 Answer 1

Reset to default 3

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

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744723207a4590033.html

相关推荐

  • default favicon for a theme?

    I am developing a theme and I wonder if there is a possibility to have a default favicon. Details: The theme already has

    14小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信