Notifications
Clear all

Issue hiding header and footer

2 Posts
2 Users
0 Reactions
10 Views
Posts: 1
Topic starter
(@john9001)
New Member
Joined: 2 days ago

I'm displaying an iframe from a different domain, which I have control over, and have inserted the ai_external.js script in the head section.  Despite specifying the correct Divs, both the header and footer continue to appear in the iFrame. I've attached a screenshot of the code.

Any pointers as to where I'm going wrong would be appreciated.

This is my shortcode:

[advanced_iframe use_shortcode_attributes_only="true" 
src="https://twistedlime.co.uk/john/sales/" width="100%" height="600"
hide_part_of_iframe="" 
iframe_hide_elements="#masthead, #site-header, #colophon" 
enable_external_height_workaround="true" use_post_message="false"]
1 Reply
TinyWebGallery
Posts: 905
Admin
(@admin)
Prominent Member
Joined: 15 years ago

Hi,

you mix the solution of the same domain and the external workaround. 

iframe_hide_elements="#masthead, #site-header, #colophon" 

is for the same domain if you define it in the shortcode! 

You need to set this in the administration - then it is saved to the ai_external.js

Also do not use
use_post_message="false"

this should be set in the administration and set to true - false is for the free version.

Also see this examples:

https://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message

Best regards, Michael 

 

Reply