使用Fusion Builder获取自定义xml提要的wordpress内容

时间:2018-09-26 00:07:04

标签: mysql wordpress

我有一个使用Avada主题的wordpress网站,并且页面使用Fusion Builder构建。

我需要创建一个自定义xml提要,该提要的链接将在其他地方提供。 我看过youtube上的本教程,该教程确切地显示了我需要做的事情,从posts表中选择数据,然后返回一个xml文件。到目前为止还可以。

但是,当wordpress使用融合生成器时,数据以奇怪的格式存储在数据库中(下面是摘录);

[fusion_builder_container hundred_percent="yes" overflow="visible"]
[fusion_builder_row]
[fusion_builder_column type="1_1" layout="1_1" spacing="yes" center_content="no" hover_type="none" link="" min_height="none" hide_on_mobile="no" class="" id="" background_color="" background_image="" background_position="left top" undefined="" background_repeat="no-repeat" border_size="" border_color="" border_style="solid" border_position="all" padding="0px 0px 30px 0px" margin_top="0px" margin_bottom="0px" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"]
[fusion_text]
<h4>‘The Tibet of Africa’ – an ancient mountainous land and one of the first countries in the world to adopt the <a href="https://en.wikipedia.org/wiki/Christianity_in_Ethiopia" target="_blank" rel="noopener">Christian faith</a>.</h4>
<h4>Hike through the 13th Century rock-hewn churches of <a href="https://en.wikipedia.org/wiki/Lalibela" target="_blank" rel="noopener">Lalibela</a>; traverse the highest mountain plateau of Africa with its vast array of indigenous wildlife; taste the finest coffee in the lush jungles of the south - the very birthplace of coffee itself.</h4>
<h4>Experience first-hand the generous hospitality of this lasting, rich and delightfully friendly culture.</h4>
[/fusion_text][
/fusion_builder_column]
[/fusion_builder_row]
[/fusion_builder_container]

这是针对网站中的页面的(第一个标题包含多个元素),我只是想获取这些值。我认为这与视频类似,因为您选择了某种类型(post_type)并对其进行过滤。但是,整个融合构建器的内容都在那里。无法区分是标题还是ID或其他属性。有办法解决这个问题吗?

0 个答案:

没有答案