Skip Navigation

[Gelöst] Setting up Schema elements for my pages

This support ticket is created vor 6 Jahre, 8 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by Minesh vor 6 Jahre, 8 Monate.

Assisted by: Minesh.

Author
Artikel
#564233

I am trying to generate schema.org data fro my custom type. I have a Type that is an event and I want to build and populate the JSON without having to write code.

Where can I add:

<script type="application/ld+json">
[
{
"@context": "hidden link",
"@type": "Event",
"name": "[wpv-post-title id="$courses"]",
"description": "[wpv-post-title]",
"image": "[wpv-post-featured-image id="$courses"]",
"url": "[wpv-post-url]",
"startDate": "[types field='event-date' style='text' format='Y-m-d H:i:s'][/types]",
"endDate": "[types field='event-end-date' style='text' format='Y-m-d H:i:s'][/types]",
"location": {
"@type": "Place",
"name": "Opentalk",
"description": "",
"url": "hidden link",
"address": {
"streetAddress": "SOme Address",
"addressLocality": "Cancun",
"addressRegion": "Cancun",
"addressCountry": "Mexico"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 40.4310271,
"longitude": -3.7126662
},
"telephone": "",
"sameAs": ""
},
"organizer": {
"@type": "Person",
"name": "naked Agility Limited - Martin Hinshelwood",
"description": "DevOps & Agility Consulting",
"url": "hidden link",
"telephone": "+44 7811 164 522",
"email": "info@nkdagility.com",
"sameAs": ""
},
"offers": [
{
"@type": "Offer",
"url": "[wpv-post-url]",
"price": "[types field='rates-public'][/types]",
"category": "primary",
"availability": "InStock"
}
]
}
]
</script>

This is for hidden link on the events pages.

I would also like to be able to do a post loop as well within the data above to show "Offers"...

#564267

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand you would like to integrate REST API support for your custom post type. There is no native feature available to support REST API and output your result as JSON.

This needs custom programming and that is beyond the scope of our support policy. If you need custom programming for your project, please feel free to contact our certified partner.
=> https://toolset.com/consultant/

However, you may try to use following plugin if that suit your requirement.
=> https://wordpress.org/plugins/rest-api/

More info:
=> hidden link
=> hidden link

#564273

No I do not want to "integrate REST API support for your custom post type", I mealy want to use WP-Types to build a bit of output in the Head as json rather than as HTML in the body.

I would think this would be fairly strait forward for wp-types to enable if it does not already do it. I can already add this to the body using wp-types... why would you not want to do this in the head as well?

#564280

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - we do have plans to integrate REST API as well but it will take time.

Regarding - adding the JSON output in head section, there is no such feature available and why we didn't add such output within head section is depends on our developers as they are the right person decide what we should include and what not.

But - I will forward your concern as a new feature request to concern department for assessment but please note that there is no ETA on it.

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