Skip Navigation

[Resolved] Rest Api v2 does not work with my custom post type

This support ticket is created 5 years, 5 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.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 18 replies, has 3 voices.

Last updated by Christian Cox 5 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1286053
toolset_post_redered_template.jpg

Great. Yes now it can be found in the data model as post-rendered-template (screenshot).
How can I select post-rendered-template and add ist into my function?

<script>
$(function() {
$.getJSON('hidden link', function(alldata) {
var contentElm = alldata.content.rendered
$(contentElm).appendTo("#userdata");
});
});
</script>

I tried to replace "content" with "post-rendered-template".
Without success.

#1286469

In basic Javascript you can use the array syntax to access an object property.

var contentElm = alldata['post-rendered-template'];
#1287065

Thank you, Christian, for your patience and your targeted support.
It Works!
Best regards
Uwe

#1287625

You're welcome