通过PHP向社交小部件添加新的社交网络 - 显示错误的图标

时间:2015-05-27 13:16:25

标签: php widget social-media wordpress

让我为我的无知而道歉;我从来没有真正看到PHP近距离接触,而且对Wordpress世界来说真的很新......

我使用此tutorial向社交媒体窗口小部件添加了Pinterest选项。添加工作,在窗口小部件中给我一个新的Pinterest选项。小部件说'Pinterest'在仪表板一侧,并在前端完美地连接到Pinterest。

问题是该网站正在显示Google+图标而不是Pinterest图标。更奇怪的是,当你检查元素时,更奇怪的是html指定了pinterest.png图标 - 当然,还显示了Google+图标。我真正能做的就是抓住我的头......

任何帮助将不胜感激。我甚至不确定我需要包含在这里:我编辑的整个php文件?该网站的链接?我很乐意提供我需要的任何东西。

谢谢你的帮助,伙计们。

1 个答案:

答案 0 :(得分:0)

所以这里发生的是图像隐藏在main-style.css的第56行:

.social.social__row li.social_li a .social_ico img,
.social__list li.social_li a .social_ico img
{ display:none !important; }

Google+图标是通过伪元素(:after)添加的,该元素会将Google+图片前置为图标字体:

.social.social__row li.social_li:last-child a .social_ico:after,
 .social__list li.social_li:last-child a .social_ico:after 
{ content:"\f0d5"; }

所以你需要做的是为你的Pinterest图标添加一个其他的css规则,如下所示:

.social.social__row li.social_li a.social_link__pinterest .social_ico img {
    display: block !important;
}
.social.social__row li.social_li:last-child a.social_link__pinterest .social_ico:after {
    display: none;
}

应该做的伎俩。

<强>更新

如果您想使用Font Awesome Pinterest图标,请删除之前添加的两行,并添加:

.social.social__row li.social_li:last-child a.social_link__pinterest .social_ico:after {
    content: "\f0d2";
}