embed iframe

This topic contains 13 replies, has 4 voices, and was last updated by  Naveen Giri 4 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #521859

    Community IMPACT
    Expired Member
    Post count: 30

    Is there a way to embed html iframe in an event description?

    #521860

    Kor
    Moderator
    Post count: 16516

    Hi 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”

    #521900

    Alex Rollin
    Moderator
    Post count: 27815

    You will need to enable scripts for the field with a customization.

    See: https://wpgeodirectory.com/docs-v2/places/custom/#scripts

    #521948

    Community IMPACT
    Expired Member
    Post count: 30

    https://wpgeodirectory.com/docs-v2/places/custom/option
    Inactive link. Might you have another?

    #521949

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Thanks for your reply. Kindly follow the link provided by Alex here https://wpgeodirectory.com/docs-v2/places/custom/#scripts

    #521957

    Community IMPACT
    Expired Member
    Post count: 30

    Not 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.

    #522075

    Community IMPACT
    Expired Member
    Post count: 30
    This reply has been marked as private.
    #522196

    Alex Rollin
    Moderator
    Post count: 27815

    Which 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.

    #522584

    Community IMPACT
    Expired Member
    Post count: 30
    This reply has been marked as private.
    #522597

    Alex Rollin
    Moderator
    Post count: 27815

    Try 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/#snippets

    #522599

    Community IMPACT
    Expired Member
    Post count: 30
    This reply has been marked as private.
    #522609

    Alex Rollin
    Moderator
    Post count: 27815

    Please share WP Admin credentials so we can take a look

    #522614

    Community IMPACT
    Expired Member
    Post count: 30
    This reply has been marked as private.
    #522679

    Naveen Giri
    Moderator
    Post count: 1559
    This reply has been marked as private.
Viewing 14 posts - 1 through 14 (of 14 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount