首页 > 解决方案 > WordPress 标记错误地显示在页面中

问题描述

我们正在从我们的生产服务器[WP-v3.9.24] 导出代码并将该代码导入到预生产服务器[WP-v5.2.4]。我们在 Prod 上的代码可以很好地显示“+”图标和“继续阅读”等功能。

当我们将相同的代码移至 Pre-prod 时,“+ 继续阅读”之类的功能和其他功能反而会显示似乎是 WP 标记语言的内容。我希望这是足够的信息。有人熟悉这个吗?有人可以帮助我朝着正确的方向前进吗?我将发布一个显示正常工作的示例 URL,以及一个显示无法正常显示的 URL:

https://www.distancecme.com/course/bls-nccp-anytime/?portfolioID=1314 - this display properly.
https://dcmeqa.wpengine.com/course/live-bls-nccp-anytime/ - this does not display properly.

我认为我无法显示屏幕截图,因此请简单地使用上面的链接来查看代码如何正确显示,而不是正确显示。

一些无法解析的原始代码在这里[它是一个公共站点,所以这里是 WP 标记代码]:

NCCR BLS

Designed to meet the NREMTs latest requirement for BLS Providers, the National Continued Competency Requirements or NCCR. This program meets the required hours for this program. These are LIVE courses and are 10 classes of the 24 hour refresher for a total of 20 hours. You do not have to take them in order. For a complete description please view our free DEMO. CECBEMS/CAPCE Accredited F-5 VILT

[accordian class="" id=""]
[toggle title="Continue Reading" open="no"]
Airway/Respiration/Ventilation: 1.5 Hours

Ventilation [1 Hours]

Oxygenation [0.5 Hour]
Cardiovascular: 6 Hours

Post-Resuscitation Care [0.5 Hour]

Ventricular Assist Devices [0.5 Hour]

Stroke [1 Hour]

Cardiac Arrest [2 Hours]

Pediatric Cardiac Arrest [2 Hours]
Trauma: 1.5 Hours

Trauma Triage [0.5 Hour]

Central Nervous System (CNS) Injury [0.5 Hour]

Hemorrhage Control [0.5 Hour]
Medical: 6 Hours

Special Healthcare Needs [1.5 Hours]

OB Emergencies [0.5 Hour]

Infectious Diseases [0.5 Hour]

Pain Management [0.5 Hour]

Psychiatric and Behavioral Emergencies[0.5 Hour]

Toxicological Emergencies – Opioids[0.5 Hour]

Neurological Emergencies – Seizures[0.5 Hour]

Endocrine Emergencies – Diabetes[1 Hour]

Immunological Emergencies [0.5 Hour]
Operations: 5 Hours

At-Risk Populations [0.5 Hour]

Ambulance Safety [0.5 Hour]

Field Triage—Disasters/MCIs [0.5 Hour]

EMS Provider Hygiene, Safety, and Vaccinations [0.5 Hour]

EMS Culture of Safety[0.5 Hour]

Pediatric Transport [0.5 Hour]

Crew Resource Management [1 Hour]

EMS Research[0.5 Hour]

Evidence Based Guidelines [0.5 Hour]

CAPCE/CECBEMS Accredited 17-GANN-F5-0011

[/toggle]
[/accordian]

[/one_half]

[one_half last="yes" class="" id=""]

Anytime EMS CEU Package

This EMS bundle provides anytime access to over 100 self-directed learning modules. Each module is 1.0 hour in length and upon successful completion offers 1.0 credit via CAPCE F-3 for a total distributive learning credit of 100 plus CEUs. This bundle provides quality education in a recorded format, Perfect for the busy EMT, AEMT, Paramedic. These courses are accepted by the National Registry of EMTs for recertification of EMTs, AEMTs, and Paramedics for the Distributive learning portion of your recertification. Save by bundling this with our live paramedic or EMT refresher course for a total refresher package. (Once issued we can not refund the cost of the Anytime Program).

This can be bundled with the live paramedic or live EMT refresher course for a complete recertification package.
[accordian class="" id=""]
[toggle title="Continue Reading" open="no"]
Do you prefer to call in with your credit card number? We can take your order by phone. Call 267-417-0009, M-F 9-5 eastern.

Length:

1 hour each course over 100 courses for a total of 100 Hours

Continuing Education Hours Provided:

1 credits each course – CECBEMS/CAPCE F-3 APPROVED

[/toggle]
[/accordian]

[/one_half]


[button link="https://store.distancecme.com/dcmecartadd/dcme/addproducttocart/sku/243US18022/" color="default" size="" type="" shape="" target="_self" title="" gradient_colors="|" gradient_hover_colors="|" accent_color="" accent_hover_color="" bevel_color="" border_width="1px" shadow="" icon="" icon_divider="yes" icon_position="left" modal="" animation_type="0" animation_direction="down" animation_speed="0.1" class="" id=""]Enroll Now[/button]

标签: wordpress

解决方案


听起来内容没有通过the_content过滤器。您所看到的称为shortcodes,它们被the_content通常由the_content()函数调用的过滤器转换为 HTML。

如果可以的话,我建议你只使用

the_content();

输出内容。有时您可能希望在输出内容之前将内容作为字符串进行额外处理,在这种情况下,只需确保将内容通过the_content过滤器,如下所示

$content = get_the_content();
apply_filters( 'the_content', $content ); /* converts shortcodes into HTML */
echo $content;

推荐阅读