Problem:
The customer wants to add a JSON-LD script with schema.org/Movie structure to their single movie page. This JSON-LD should include information from the single post and custom fields created with Toolset, for better SEO and to help search engines understand the content.
Solution:
We suggested using Toolset Views to create a JSON output. This involves using the classic version of the view editor to structure the JSON output according to the schema.org/Movie structure. Steps include:
Enable the classic view editor in Toolset settings.
Create a new view in Toolset -> Views.
Replace the default wpv-loop tags with the necessary JSON structure in the view loop editor.
Ensure the "Disable the wrapping DIV around the View" option is selected for correct JSON formatting.
An example structure was provided to illustrate how to format the JSON output within the view.
Additionally, the customer can use the view's API function get_view_query_results to build and display the JSON output with PHP if more customization is needed.
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views-api/#get_view_query_results
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
This topic contains 3 replies, has 2 voices.
Last updated by 4 months, 1 week ago.
Assisted by: Mateus Getulio.