【问题标题】:Style not displaying when called using page-id in wordpress在 wordpress 中使用 page-id 调用时不显示样式
【发布时间】:2014-06-03 09:38:40
【问题描述】:

我在这个网站工作 My Site 。在主页中,我使用以下代码调用了页面的内容

<?php 
$id=48; 
$post = get_post($id); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;  
?>

而我的内容是

<strong>Atlanta Weekly Schedule:</strong>

Sunday Explosive Service 10am - 12:15pm

Wednesday Bible Study, 7 - 8:30pm

Friday Freedom Night (Prayer, Prophetic, Miracle &amp; Deliverance Service), 7 - 10pm

&nbsp;

&nbsp;

<strong>New York Weekly Schedule:</strong>

Sunday Explosive Service 10am - 12:15pm

Wednesday Bible Study, 7 - 8:30pm

Friday Freedom Night (Prayer, Prophetic, Miracle &amp; Deliverance Service), 7 - 10pm

正如你所看到的,我给出了两个带有标签的标题。但是当它显示在主页中时,源代码会显示代码但不显示为粗体。有人请帮助我!谢谢!!

【问题讨论】:

    标签: php html css wordpress


    【解决方案1】:

    如上所述,我已经查看了您的网站并跟踪了您的 css 文件。在 reset.css 中,您提到了 font-weight: inherit for strong tag。

    所以它试图从它的父元素继承这个属性。

    欲了解更多信息,请访问:http://www.w3schools.com/cssref/css_inherit.asp

    【讨论】:

    • 那有什么解决办法?
    • 你可以这样写css:p strong { font-weight: bold; }
    【解决方案2】:

    将以下 CSS 添加到您的代码中

    strong { 字体粗细:粗体; }

    会有用的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-01
      • 1970-01-01
      • 2021-07-23
      相关资源
      最近更新 更多