embed iframe
This topic contains 13 replies, has 4 voices, and was last updated by Naveen Giri 5 years, 11 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
December 17, 2019 at 5:03 am #521859
Is there a way to embed html iframe in an event description?
December 17, 2019 at 6:41 am #521860Hi there,
Thanks for your post. You can edit the “Event Description” custom field https://wpgeodirectory.com/docs-v2/places/custom/option as shown in the attached image and enable the “Show advanced editor”
December 17, 2019 at 11:18 am #521900You will need to enable scripts for the field with a customization.
See: https://wpgeodirectory.com/docs-v2/places/custom/#scripts
December 17, 2019 at 2:36 pm #521948https://wpgeodirectory.com/docs-v2/places/custom/option
Inactive link. Might you have another?December 17, 2019 at 2:47 pm #521949Hi there,
Thanks for your reply. Kindly follow the link provided by Alex here https://wpgeodirectory.com/docs-v2/places/custom/#scripts
December 17, 2019 at 3:18 pm #521957Not entirely tracking my action items to resolve this issue. Rather unfamiliar with the GeoDirectory environment. Do I embed the italic code somewhere? Do I just complete these steps from the secondary link?
1. Open your CPT custom fields
2. Add a textarea type field ‘my_iframe’ for the field key. Make sure it is admin only, active, and allowed for price packages. In the advanced options allow media embed.
3. Add the video code snippet example using the code snippets plugin. Change the field key ‘video’ to ‘my_iframe’
4. Visit your widgets and add GD Post Meta to the sidebar for the details page. Select your field key -> ‘my_iframe’ field and choose your display options.
5. Edit a listing and add an iFrame to the field.
6. View the page to see the iFrame rendered.December 18, 2019 at 12:16 am #522075This reply has been marked as private.December 18, 2019 at 2:35 pm #522196Which field do you want to enable for iframes, for which CPT?
Please share WP Admin credentials so we can take a look at your settings.December 20, 2019 at 4:12 pm #522584This reply has been marked as private.December 20, 2019 at 4:42 pm #522597Try adding this as a code snippet:
/** * Skip sanitize for the post_content field * * WARNING – Skipping sanitize routine for field values may result in a Cross-Site Scripting Attack (XSS) on your site. */ function gd_snippet_custom_skip_sanitize_field( $value, $gd_post, $custom_field, $post_id, $post, $update ) { // Fields to skip strip tags. $skip_strip_tags = array(); $skip_strip_tags[] = ‘post_content’; if ( in_array( $custom_field->htmlvar_name, $skip_strip_tags ) ) { $value = $gd_post[ $custom_field->htmlvar_name ]; if ( isset( $custom_field->data_type ) && ( $custom_field->data_type == ‘DECIMAL’ || $custom_field->data_type == ‘INT’ ) && $value === ” ) { $value = null; } } return $value; }From: https://wpgeodirectory.com/docs-v2/places/custom/#scripts
For info about code snippets: https://wpgeodirectory.com/docs-v2/faq/customizing/#snippetsDecember 20, 2019 at 4:57 pm #522599This reply has been marked as private.December 20, 2019 at 5:30 pm #522609Please share WP Admin credentials so we can take a look
December 20, 2019 at 5:49 pm #522614This reply has been marked as private.December 21, 2019 at 2:27 pm #522679This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket