Skip Navigation

[Resolved] How to make an imported list on a page to several posts

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 11 months ago.

Author
Posts
#878746
Member fields.PNG

Hi Support.

I have finally managed to import a list via JSON to a single page via this code and JSON Content Importer:

{% for r in resultdata %}
Firmanavn: {{r.Company}} <br>
Navn: {{r.Name}}<br>
Adresse: {{r.Adress}}<br>
Postnr.: {{r.Zip}} By: {{r.City}}<br>
Email: {{r.Email}}<br>
Telefon: {{r.Phone}}<br>
CVR: {{r.CVR}}<br>
Hjemmeside: {{r.Web}}<br>
Præsentation: {{r.ProfileText}}<br>
Plads til nye kunder: {{r.NewCustomers}}<br>
Eksaminer: {% for k,v in r.KompetenceList.Exams %}
{{v}},
{% endfor %}<br>
Erfaringer: {% for k,v in r.KompetenceList.Experience %}
{{v}},
{% endfor %}<br>
Økonomisystemer: {% for k,v in r.KompetenceList.EconomySystems %}
{{v}},
{% endfor %}<br>
Systemkendskab: {% for k,v in r.KompetenceList.ModulFeatures %}
{{v}},
{% endfor %}<br>
POS: {% for k,v in r.KompetenceList.POS %}
{{v}},
{% endfor %}<br>
<hr>
{% endfor %}

This gives the result I have shown in the uploaded image.

Now I would like to take every list item and turn them in to posts, so that I can show them in different Views.

I think that I can create fields for the posts but I don't know how to separate the items in one single post and create new posts from them.

Also I would like posts that no longer exists on the list to dissapear again.

Any ideas how to do that? If it helps I think I can manage to put it all in to fields in a table.

Thank you in advance.

Kind regards.

Kristen

#878831

We cannot assist this kind of custom code and solutions.

Eventually, some other user has inputs, but from the part of Support, we cannot assist this.

However, I suggest to ask StackOverflow, as your question is not related to Toolset - it's about how to create posts starting with a JSON.

Once you created the Posts (which is usually done in the WP Admin or with an API Call), then those will be just Custom Post Types as any other, and you will be able to display those in a View, of course.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.