在wordpress中使用page-id调用时,样式不显示 [英] Style not displaying when called using page-id in wordpress
本文介绍了在wordpress中使用page-id调用时,样式不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在本网站我的网站上工作。在主页中,我使用下面的代码调用了页面的内容:
<?php
$ id = 48;
$ post = get_post($ id);
$ content = apply_filters('the_content',$ post-> post_content);
echo $ content;
?>
我的内容是
< strong>亚特兰大周刊:< / strong>
星期日爆炸服务10am - 12:15 pm
星期三查经,7 - 8:30 pm
星期五自由之夜(祈祷,预言,奇迹& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp;
& nbsp;
< strong>纽约每周计划:< / strong>
星期日爆炸服务10am - 12:15 pm
星期三查经,7 - 8:30 pm
星期五自由之夜(祈祷,预言,奇迹& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; Deliverance Service),7-10pm
带有标签。但是当它显示在主页时,源代码显示的是生态但不显示为粗体。有人请帮助我!谢谢!
解决方案
将以下CSS添加到您的代码中
{font-weight:bold; }它会工作
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 & Deliverance Service), 7 - 10pm
<strong>New York Weekly Schedule:</strong>
Sunday Explosive Service 10am - 12:15pm
Wednesday Bible Study, 7 - 8:30pm
Friday Freedom Night (Prayer, Prophetic, Miracle & 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!! THANKS!!
解决方案
Add following CSS to your code
strong { font-weight: bold; }
It will work
这篇关于在wordpress中使用page-id调用时,样式不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文