WordPress上的Favicon [英] Favicon on wordpress

查看:101
本文介绍了WordPress上的Favicon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在wordpress上的收藏夹图标出现问题,我什至没有弄清楚为什么,因为它可以在Firefox上使用.但是,让我回顾一下这个问题.我使用两种方法在网站上显示收藏夹图标.我的第一种方法是通过以下方式在链接标签上添加图标图标:

<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/chick.png">
    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/chick.svg">

它不起作用.

然后,我尝试使用wordpress将其与站点标识一起添加,因此我通过wordpress仪表板(自定义)上传了png文件.但这也没有用,我的意思是,很奇怪的是,我只能在仪表板页面上或例如在404页面(以及每个单独的帖子)中看到我的收藏夹图标.

我辞职是因为我正在处理网站的其他内容(如果我使用firefox浏览网站,该网站图标仍然起作用).

无论如何,今天由于工作原因我不得不切换域名,我建立的网站是针对客户的,现在我意识到我可以在chrome上显示我的网站图标,但是它是旧的我迁移到的域之一.有人知道为什么会这样吗?

我的网站地址是:ickapea.me.

提前谢谢

解决方案

在WordPress 4.3或更高版本上:

  • 准备一个favicon.ico图像文件,该文件必须是正方形且至少为512 高宽像素.
  • 转到管理屏幕>外观>自定义
  • 点击网站标识
  • 单击在站点图标上选择图像"部分,上传您的favicon.ico图像文件,然后单击选择".

您还应该将favicon.ico文件的副本上传到网站的主目录.

有关完整的详细信息,请参见 http://codex.wordpress.org/Creating_a_Favicon .

I've got a problem with my favicon on wordpress, I didn't even figure it out why because it worked on firefox. But let me review the problem. I used two ways to display the favicon on my website. My first approach was to add the favicon on the head with the link tag in this way:

<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/chick.png">
    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/chick.svg">

and it didn't work.

Then I tried adding it with the site identity with wordpress, so I uploaded a png file through the wordpress dashboard (customize). But it didn't work too, I mean, the weird thing was that I was able to see my favicon, but only when I was on the dashboard page or for example in my 404 page (and each single-post).

I quitted because I was working on other thing of my website (the favicon worked anyway if I browse my site with firefox).

Anyway today I had to switch my domain name for working reason, the website which I'm building is for a client, and now I've realized that I'm able to display my favicon on chrome, but it's the older one of the domain in which I migrate. Does anyone know why it is happening?

my website address is: chickapea.me .

Thank you in advance

解决方案

On WordPress Version 4.3 or later:

  • Prepare a favicon.ico image file which must be square and at least 512 pixels wide and tall.
  • Go to Administration Screen > Appearance > Customize
  • Click Site Identify
  • Click Select Image at Site Icon section, upload your favicon.ico image file and click Select.

You should also upload a copy of your favicon.ico file to the main directory of your site.

See http://codex.wordpress.org/Creating_a_Favicon for full details.

这篇关于WordPress上的Favicon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆