Integrating oEmbed into Organizations’ WordPress Pages
oEmbed is a powerful feature that removes the needs for HTML5 iframe tags. This feature will create an embedded representation of a YuJa URL within an Organization. The following document will provide instructions on how to integration oEmbed into the organization’s WordPress page.
Integrating oEmbed into an Organization’s WordPress Page
In order to proceed, a WordPress account with access to the Theme Editor is needed.
- Login into your WordPress account, then access the Theme Editor.
- Open the functions.php file, then add one of the following lines based on how your Organization is set up and Save.
- oEmbed is now ready to use. Users can test it out by posting a direct YuJa media links to any pages of your Organization’s website.
- If oEmbed is installed correctly, the links will show up as embedded videos once published.
<?php wp_oembed_add_provider( 'https://<YOUR_ORGANIZATION>.yuja.com/V/*', 'https://<YOUR_ORGANIZATION>.yuja.com/services/oembed', false ); ?>
<?php wp_oembed_add_provider( 'https://<CUSTOM_YUJA_ORGANIZATION_URL>.com/V/*', 'https://<CUSTOM_YUJA_ORGANIZATION_URL>.com/services/oembed', false ); ?>
Or (Use this option if you wish to use another Organizations’ direct YuJa URLs within your district or system):
<?php wp_oembed_add_provider( 'https://*/V/*', 'https://<YUJA_ORGANIZATION_URL>.com/services/oembed', false ); ?>