Skip to content
Radoslav Georgiev edited this page Oct 21, 2018 · 3 revisions

Purpose

The Embed field uses the wp_oembed_get function to let users enter the URL of an embeddable object and preview it.

embed-field

Settings

There are no additional settings for this field.

Usage

You can use the Embed field in combination with all fields, described on the Using field valuespage.

Standard functions (get_value, get_sub_value and etc.) will return the URL, entered in the field. Using the_* functions however, will return the full oEmbed code, associated with the URL:

<div class="embed-preview">
	<!-- Display the HTML of the field -->
	<?php the_value( 'embed_field' ) ?>

	<!-- Use manually -->
	<a href="<?php echo get_value( 'embed_field' ) ?>">View full video</a>
</div>
Clone this wiki locally