• Resolved lersmethasakul

    (@lersmethasakul)


    Good Morning,

    I am looking to load this JSON into a WordPress site. Are you able to point me in the right direction, please?

    [
    {
    "id": 1,
    "title": {
    "rendered": "Example"
    },
    "content": {
    "rendered": "aaaaaaaa",
    "protected": false
    },
    "categories": [
    1
    ],
    "links": {
    "self": [
    {
    "href": "https://aaaa.com"
    }
    ]
    }
    }
    ]

    Have a great day,

Viewing 1 replies (of 1 total)
  • Plugin Author berkux

    (@berkux)

    Hi, try this:

    [jsoncontentimporter url="https://test.json-content-importer.com/extra/json/lersmethasakul.json" debugmode="10"]id = {id}

    {subloop:title:-1}
    rendered = {title.rendered}

    {/subloop:title}
    {subloop:content:-1}
    rendered = {content.rendered}

    protected = {content.protected}

    {/subloop:content}
    categories:

    {subloop-array:categories:1}

    {categories.0}

    {/subloop-array:categories}

    {subloop:links:-1}
    self:

    {subloop-array:links.self:-1}

    href = {links.self.href}

    {/subloop-array:links.self}

    {/subloop:links}[/jsoncontentimporter]

    Bernhard

Viewing 1 replies (of 1 total)
  • The topic ‘Looking to load this JSON, please help’ is closed to new replies.