Title: Embed an code use Custom_field
Last modified: January 25, 2018

---

# Embed an code use Custom_field

 *  Resolved [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/)
 * (@bebiggerboy)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/)
 * Hello Jeff Starr,
    I’m creating a form that allows the user to enter an ** iframe**
   code from an external page. I added a “**Custom Field**” to the submit form. 
   Name of the custom field: “**code** ” and the lable: ” **Iframe Code** “. Im 
   tried to enter an Iframe code from Youtube and hit Submit buttom, I got error:“**
   Error: iframe code required**“. So can USP submit an Iframe code ? If yes, Whats
   wrong with my option and how can I fix it? Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/#post-9900393)
 * Hi, glad to help. The plugin uses WP’s `wp_kses_allowed_html('post')` when filtering
   the custom field content. By default, dangerous stuff like `<script>`, `<iframe
   >`, and so forth are removed. Basically removes tags and attributes that you 
   don’t want random people adding to post content.
 * To override the default WP functionality for USP, you or a developer would need
   to use the `usp_content_allowed` hook. Here is the context, in `user-submitted-
   posts.php`:
 * `$allowed_tags = apply_filters('usp_content_allowed', $allowed_tags);`
 * That would enable custom code to add iframe or whatever tags are necessary to
   the array of allowed tags.
    -  This reply was modified 8 years, 4 months ago by [Jeff Starr](https://wordpress.org/support/users/specialk/).
 *  Thread Starter [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/)
 * (@bebiggerboy)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/#post-9900965)
 * Hello Jeff Starr,
    Thank you for supporting me. Well, I’m not a website programmer
   so its hard. I added all **iframe** tags/attributes to **$allowedtags** and the**
   $allowedposttags** on **Kses.php** For now, I can submit iframe code and play
   it too. **_Its working fine_**. 😀 :/ But I wonder if I did the right steps?
    -  This reply was modified 8 years, 4 months ago by [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/).
    -  This reply was modified 8 years, 4 months ago by [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/).
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/#post-9903230)
 * Awesome glad you got it sorted. Make sure to follow the WP API and you should
   be fine. If in doubt, hire a professional to review your code for you, just to
   be 100% sure.
 *  Thread Starter [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/)
 * (@bebiggerboy)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/#post-9903319)
 * Yes. Thank you so much! I’ll purchase for the PRO version. Good bye.
    Love you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Embed an code use Custom_field’ is closed to new replies.

 * ![](https://ps.w.org/user-submitted-posts/assets/icon-256x256.png?rev=2567685)
 * [User Submitted Posts – Enable Users to Submit Posts from the Front End](https://wordpress.org/plugins/user-submitted-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-submitted-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-submitted-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/user-submitted-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-submitted-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-submitted-posts/reviews/)

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [iframe](https://wordpress.org/support/topic-tag/iframe/)

 * 4 replies
 * 2 participants
 * Last reply from: [bebiggerboy](https://wordpress.org/support/users/bebiggerboy/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/embed-an-code-use-custom_field/#post-9903319)
 * Status: resolved