0

Есть такой xml файл, в котором есть записи.

<post>
<Title>What Is Bigos? (Correct answer)</Title>
<Content>
<p>What is Bigos and how is it used?</p>
<ul>
<li>
As a dish that does not spoil quickly and only gets tastier with each reheating,
<b>bigos</b>
has been traditionally used as a provision for travellers and campers or consumed at outdoor events, such as a hunt [more]
</li>
</ul>
<h2>What is bigos called in English?</h2>
Bigos (Polish pronunciation: [ˈbʲiɡɔs]; Belarusian: і, bihas, or і, bihus, Lithuanian: bigusas), often translated into English as hunter's stew, is [more]
<h2>What does bigos taste like?</h2>
In 17
<sup>th</sup>
century cuisine, bigos was either made sour with vinegar, lemons, limes, or even with sorrel or gooseberries; made sweet with [more]
<p style="text-align: center;"></p>
<h2>How do you make bigos?</h2>
Bigos Recipe Cut your washed cabbage in thin slices and boil until tender in a pot. Boil the sauerkraut in [more]
<h2>How many calories are in a bigos?</h2>
Hunter's Stew Bigos (1 cup) contains 13g total carbs, 9g net carbs, 15g fat, 2g protein, and 180 calories.
<h2>Can bigos be frozen?</h2>
"Bigos " may be frozen so we can make a substantial quantity of the dish and store it in our [more]
<h2></h2>
My dad used to make hunter's stew but he called it kapusta, which means cabbage in Polish. Hunter's stew, also [more]
<h2>What is the national dish of Brazil?</h2>
Feijoada is a black bean stew that is brewed with a variety of salted and smoked pork and beef products [more]
<h2>What is the national dish of Poland?</h2>
Bigos stew is the national dish of Poland. It can be made with any kind of meat from pork to [more]
<h2>What is the Polish word for sauerkraut?</h2>
The real confusion comes in because, while each of these preparations may have their own proper (long) name, ( kapusta [more]
<h2>When was Bigos invented?</h2>
Sauerkraut, potatoes, bacon, and kielbasa are some of the additional ingredients which complete the dish. It has been present in [more]
<h2>What is haggis meat?</h2>
haggis, the national dish of Scotland, a type of pudding composed of the liver, heart, and lungs of a sheep [more]
</Content>
<category>Все кеи</category>
</post>

И есть в записях ACF поля, что-то вроде карточек. Я хочу в заголовок вносить h2, а в контент - весь текст, что идёт после h2.

Нужно хотя бы в заголовком разобраться. По идее, должно работать, но заголовок не загружается. Но количество карточек верно - они формируются по количеству h2.

введите сюда описание изображения

Буду благодарен за помощь

1 ответ 1

0

Нет ли возможности переделать файл импорта, чтобы было 2 столбика - заголовок и контент?

В таком виде проблем быть не должно.

введите сюда описание изображения

2
  • Да, я думал об этом, но там таких постов более 1000.... Есть ли способ как-то автоматизировать это, вытащить контент и заголовок? 8 фев 2022 в 13:03
  • Вам нужен скрипт, к сожалению, не могу с этим помочь. Попробуйте создать новый вопрос, или заказать на фрилансе за несколько баксов.
    – Garik
    8 фев 2022 в 13:23

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.