I tried moving the file:
event-espresso-core-reg/core/templates/json_linked_data_for_event.template.php
into my child theme root to apply an override (as is the custom with other EE templates).
However, it doesn’t seem to be overriding the ld+json output.
Is this expected behavior?
Is there a way to customize this template?
Thanks for any insight here! Also, feel free to tell me if there is a better way to customize the ld+json schema. Specifically I want to add “performer” to the schema output and include the people add-on data that is related to the event.
The core plugin doesn’t actually check in the theme for the json_linked_data_for_event.template.php, it can only load that template from core plugin.
One way the output can be customized is by using the AHEE__json_linked_data_for_event__template
action hook. The hook can be used to add more to the original output.
You can also filter the template args with this filter hook: FHEE__EEH_Schema__add_json_linked_data_for_event__template_args
If your customizations require more than the hooks can provide, you could remove the ld+json output and replace with your own. EE hooks into the wp_print_scripts hook to add the ld+json output. The following code will unhook it:
Excellent! I can definitely move forward with those options.
I am pleased with how customizable the EE system is. It is vast … so your guidance is much appreciated.
The support post ‘ld+json customization’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.