如何解决如何让我的 Favicon 显示在 WordPress 自定义主题中?
我正在尝试在 wordpress 标题中显示一个图标,但它对我不起作用 - 你认为会出现什么问题?
我正在使用 Twig/Timber 进行开发。
<link rel="shortcut icon" type="image/x-icon" href="{{options.header.favicon.url | default(site.theme.link ~ '/images/favicon.ico')}}"/>
一切正常:
<link rel="stylesheet" href="http://protoolsite.local/wp-content/themes/protool-theme/style.css" type="text/css" media="screen"/>
<link rel="shortcut icon" type="image/x-icon" href="http://protoolsite.local/wp-content/themes/protool-theme/images/favicon.ico"/>
<Meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<Meta http-equiv="X-UA-Compatible" content="IE=edge">
<Meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="author" href="http://protoolsite.local/wp-content/themes/protool-theme/humans.txt"/>
当我查看此链接时,它根本没有出现任何问题:http://protoolsite.local/wp-content/themes/protool-theme/images/favicon.ico
它只是一直显示 wordpress "W" 图标。
解决方法
很确定 Wordpress 也需要“图标”。
<link rel="icon" type="image/x-icon" href="http://protoolsite.local/wp-content/themes/protool-theme/images/favicon.ico"/>
不过在 Wordpress 中转到 appearance
> customise
> site identity
会更容易。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。