使用WordPress的Favicon [英] Favicon using wordpress

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

问题描述

我正在尝试在wordpress中更改收藏夹图标.我为此在媒体和主题定制中上传了图片,在网站标识下,我将该图片用作收藏夹图标.

I am trying to change favicon in wordpress. For which i have uploaded image in media and in theme customisation, under site identity i used that image as a favicon.

哪个显示在我的管理面板中,而不显示在网站浏览器中.我尝试对其进行检查,因此它在行下方显示给我,但href中没有显示图像名称

Which is displaying in my admin panel but not in website browser. I tried to inspect it, so it is showing me below line but not coming image name in href

<link rel="icon" href="" type="image/x-icon">

为此,我需要使用相应的代码更改每个php文件的头部

So for that i need to change my each php file's head with appropriate code that is

<link rel="icon" href="http://my_url/image" sizes="32x32" />

但是我的问题是,无论如何,我可以直接更改它而无需转到wordpress中所有页面的标题.

but my question is, is there anyway where i can directly change it without going to all the pages' header in wordpress.

我还尝试了清除缓存和所有其他解决方案,但是没有用.

I also tried clearing cache and all the other solution, but not working.

推荐答案

如果您的wordpress版本是4.2+,只需在header.php中的<head>标记之间添加wp_head():

If your wordpress version is 4.2+, just add wp_head() in your header.php between <head> tags:

<?php wp_head(); ?>

您应该可以从管理屏幕>外观>立即自定义中更改收藏夹图标.

You should be able to change the favicon from Administration Screen > Appearance > Customize now.

函数参考: wp_head()

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

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