Home Forums Front-end Issues Embed video youtube frontend? Reply To: Embed video youtube frontend?

  • I think I’ve got the same problem as ngtrian.
    Somehow I’m not able to embed a video in a front-end form.
    In the back-end it works fine, but in the front-end it shows the link.
    Ive also tried it by clicking the “Add Media” button, but in this case it shows the link within the [embed] [/embed] tags.
    Is there something that I’m missing with creating the acf-form?
    I’m using the following code:

    $options = array(
        	/* (int|string) The post ID to load data from and save data to. Defaults to the current post ID.
        	Can also be set to 'new_post' to create a new post on submit */
        	'post_id' => 'new_post',
        	'form_attributes' => array( // attributes will be added to the form element
            'class' => ''
        	/* (array) An array of post data used to create a post. See wp_insert_post for available parameters.
        	The above 'post_id' setting must contain a value of 'new_post' */
        	'new_post' =>  array(
        						'post_type'		=> 'odin_page', // This is my own created post type.
        						'post_status'		=> 'publish'
        	/* (boolean) Whether or not to show the post title text field. Defaults to false */
        	'post_title' => true,
        	/* (boolean) Whether or not to show the post content editor field. Defaults to false */
        	'post_content' => true,
        	/* (boolean) Whether or not to create a form element. Useful when a adding to an existing form. Defaults to true */
          	'form' => false

    Thanks for your help!