• [ Moderator note: moved to Fixing WordPress. Please do not use Developing With WordPress for these topics. ]

    Hi guys,
    Looking for a way to hard code a google map into one of the front page sections, I have the code out putting ok in the page that has been created for it, however when I link it using the customizer to be a front page section, it returns blank.

    Thian

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The preview is rendered in an iframe and the Google map comes from a third party server. To prevent XSS attacks, the browser invokes very rigid security for third party content in iframes. The third party server needs to whitelist your domain via a header before the browser will display map content in an iframe. I really doubt there’s any way to get the map API to whitelist content in your iframes, so essentially it cannot be done. Scheming hackers are why we cannot have nice content ??

    About all you can do is provide a static map image background for customizer previews, which on a normal page would be overlaid with live map content.

    Thread Starter ThianBrodie

    (@thianbrodie)

    Hey bcworkz, thanks for moving the thread and the reply, when you think about it, that actually makes sense.
    What I have noticed however is, I can not output any hard code to any of the panels,a example I place <h1>Hello World</h1> in between the <div class=”entry-content”></div> on a created page /template-parts/page/test-page.php. It works great on the actual pages of the site, but does not show on the front page panels when the page is assigned with the customiser. The front page panels only seam to show what has been inputted into the wysiwig editor of WordPress. Have I missed something here do you think buddy?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hard Coding Front Page Panels of Twenty Seventeen’ is closed to new replies.