【问题标题】:Use special fonts on a wordpress blog在 wordpress 博客上使用特殊字体
【发布时间】:2014-10-08 07:49:07
【问题描述】:

我想在我的 wordpress 博客上使用我从 webtype.com 支付的字体。我不拥有该博客,因此无法将主 php 文件中的任何内容更改为 function.php。因此,我找到的唯一解决方案是在 css 自定义文件中添加此内容:

@font-face {
     font-family: "Scout Normal";
     src: url("http://the/url/of/the/file") format("woff");
     font-style: normal;
     font-weight: normal;
}
.block p {
     font-family: "Scout Normal";
}

问题是每次我保存文件时,Wordpress 都会在加载字体时删除 url,这意味着

src: url("http://the/url/of/the/file") format("woff");

成为

src: format("woff");

您有什么想法来强制加载字体,或者有其他想法来加载它吗? 感谢您的帮助。

【问题讨论】:

  • 你不能按原样提供css而不使用php吗?
  • @DanielA.White 我没用过php,不懂?
  • 我们需要更多的上下文。你怎么把它包括在内?
  • 来自wordpress的自定义页面。这是您可以购买的功能,可让您添加一些 CSS 规则。这是一个screenshot,它可以帮助你。所以你可以看到我是如何添加 css 的。
  • 那么这属于 wordpress.stackexchange.com

标签: wordpress fonts font-face


【解决方案1】:

您可以通过在此处从 wordpress 后端更改它来将其添加到函数中:外观 > 编辑器

http://prntscr.com/4ddfn4

【讨论】:

  • 不,我不能,我无法访问这个,我想这是因为我没有主持博客。
  • 尝试让你自己的 style.css 放在你的主机上,而不是 make @import url('/css/styles.css');在 wordpress 中的 css 中,您没有访问 php 文件的权限。
  • 不,它不起作用,如果我们没有 wordpress 博客,这是不可能的。
猜你喜欢
  • 2020-08-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-27
  • 2012-07-07
  • 2015-10-25
  • 1970-01-01
  • 2014-02-08
相关资源
最近更新 更多