简体   繁体   English

在wordpress中使用page-id调用时样式不显示

[英]Style not displaying when called using page-id in wordpress

I was working in this site My Site . 我在该网站“ 我的网站”中工作 In the home page I have called the contents of a page using the following code 在主页中,我使用以下代码调用了页面的内容

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

And my content is 我的内容是

<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

As you can see the I have given two heading with tag .But when it is displayin in the home page the source shows th ecode with but not displaying as bold.Someone please help me!! 如您所见,我给了两个带有tag的标题,但是当它显示在主页中时,源代码显示了带有的ecode,但没有显示为粗体。请有人帮帮我! THANKS!! 谢谢!!

I have reviewed your website as mentioned and traced your css file. 我已如上所述审查您的网站并追踪了您的CSS文件。 In reset.css you have mentioned font-weight: inherit for strong tag. 在reset.css中,您提到了font-weight:继承以获得强标签。

So its trying to inherits this property from its parent element. 因此,它试图从其父元素继承此属性。

For more information visit: http://www.w3schools.com/cssref/css_inherit.asp 有关更多信息,请访问: http : //www.w3schools.com/cssref/css_inherit.asp

Add following CSS to your code 将以下CSS添加到您的代码中

strong { font-weight: bold; 强{font-weight:粗体; } }

It will work 会工作的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM