Title: Using and iframe
Last modified: March 1, 2022

---

# Using and iframe

 *  [in-business](https://wordpress.org/support/users/in-business/)
 * (@in-business)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/)
 * Is it possible to put and iframe in any of the database fields – I’ve tried using
   a rich text field and entered this on the “Text” tab and if shows on the “Visual”,
   but then when I update the post this disappears.

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15416349)
 * It’s not possible to insert an iframe into a rich text element and probably you
   don’t want your users doing that, as it can be a security risk.
 * To accomplish this, you can try using a “shortcode” form element and configure
   the field to use a shortcode that will display an iframe. I don’t have the details
   on that at this moment, but it is in theory possible.
 * This will give you a way to validate the user’s input to address possible security
   issues.
 *  Thread Starter [in-business](https://wordpress.org/support/users/in-business/)
 * (@in-business)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15416624)
 * Thank you – I have tried that and it doesn’t work, and by the way it is only 
   myself that will enter this and it will be a default field.
 * On the basis it won’t be users doing this, can you suggest another way to achieve
   this please?
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15416806)
 * What did you try? I’m pretty sure this will work.
 * The only other way to do this is with custom code.
 *  Thread Starter [in-business](https://wordpress.org/support/users/in-business/)
 * (@in-business)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15416865)
 * Hi – I tried setting up a ‘Shortcode’ field and entered this in the shortcode
   on the field settings:
 * `<iframe src="https://www.url.com/" rel="nofollow" width="100%" height="650">
   </iframe>`
 * But when I enter it as shortcode on a blog post it looks like this with the `
   <p>` (I have tried it with the `<p>` too and it still doesn’t work:
 * `<p><iframe src="https://www.url.com/" rel="nofollow" width="100%" height="650"
   ></iframe></p>`
 * Not sure if I should enter the short code in the shortcode field or on the field
   that shows on the Participant Record?
    -  This reply was modified 4 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15416976)
 * OK, if you take a look at the description of how to configure a shortcode field,
   it has to be a shortcode, not HTML.
 * You need use a shortcode that will display an iframe, I don’t know if WordPress
   has one built in, if not you may need to create it, or maybe there is a plugin
   that will add one.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15417168)
 * I remembered that I wrote a plugin that adds an “iframe” field type to Participants
   Database:
 * [https://gist.github.com/xnau/613f05399cd4aa7d92e21b2516a472e0](https://gist.github.com/xnau/613f05399cd4aa7d92e21b2516a472e0)
 * [How to Install a WordPress Plugin from a Gist](https://xnau.com/how-to-install-a-wordpress-plugin-from-a-gist/)
 *  Thread Starter [in-business](https://wordpress.org/support/users/in-business/)
 * (@in-business)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15417534)
 * Ok, and to help me understand the code I am entering in the Shortcode field vs
   what the entry is expecting on the Participants Record, let me explain another
   time I’ve used this (by the way I wasn’t too sure if this question should take
   this to the Add-on), but I don’t think so, but here goes.
 * I have used the short code to list a table using this: [pdb_list search=true 
   sort=true display_count=true list_limit=24 orderby=”last_name,first_name” order
   =”asc,asc” filter=”approved=yes” fields=”first_name, country, link_to_post, review_rating,
   flexible_booking_yes_no, boat_length, maximum_guests, sde_lux_rating_pct”]
 * The above is what I created as an output for a table.
 * To make this work I then have to enter the exact same code into the field entry
   cell on the Participant Record – i.e. if I leave it blank nothing is shown on
   the post.
 * I would love to be able know how to change the above code so that on the Participant
   Record I simply enter the “country” so that the table is output only showing 
   the one country, or what ever else I would like the table to output as.
    -  This reply was modified 4 years, 3 months ago by [in-business](https://wordpress.org/support/users/in-business/).
    -  This reply was modified 4 years, 3 months ago by [in-business](https://wordpress.org/support/users/in-business/).
    -  This reply was modified 4 years, 3 months ago by [in-business](https://wordpress.org/support/users/in-business/).
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15419904)
 * As far as I can tell, and I’m not sure I understand what you’re trying to do 
   here, this question is only about Participants Database.
 * If you want to experiment with using a [pdb_list] shortcode in a shortcode field,
   you can do that, it is in theory possible, but with possibly unexpected results.
   This is absolutely not what that field type is designed to do. Again, I’m unsure
   if this is what you want.
 * The shortcode field works by building a shortcode and displaying it. I builds
   the shortcode by replacing a value in the “shortcode” setting in the field definition
   with the value of the field.
 * Based on what I think you are asking about, you could set the shortcode field
   up with something like this: `[pdb_list fields=%s]`
 * Then if the value of the field is “country” it will display the shortcode as 
   though it were: `[pdb_list fields=country]` which would display a list with only
   the values form the “country” field.
 * You can, of course, add any other attributes to the shortcode you want.

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

The topic ‘Using and iframe’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

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

 * 8 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/using-and-iframe/#post-15419904)
 * Status: not resolved