Tagged: x
-
AuthorPosts
-
September 30, 2016 at 4:02 pm #1197821
breatheprana108ParticipantHi,
I’m trying to embed a bit of javascript in my site, but I am not sure how to add it to the Glogal Javascript, then have it appear in a widget area. Can you help?
Website:
It’s a square up appointments widget:
<!– Start Square Appointments Embed Code –><script src=’https://squareup.com/appointments/buyer/widget/d2f9c7e6-b202-48d2-94f0-6b1d7647566a/05FYBR52ZDJ10.js’></script><!– End Square Appointments EmbedCode –>
I also need to put more than one.
September 30, 2016 at 4:03 pm #1197822
breatheprana108ParticipantThis reply has been marked as private.September 30, 2016 at 8:24 pm #1198039
JadeModeratorHi there,
Please add the code in side a Raw Content element to the page that you want to add it on.
Hope this helps.
October 2, 2016 at 4:10 pm #1199630
breatheprana108ParticipantHi I did that in cornerstone and it would not allow me to do it. It’s throwing a notification to add to global JS area.
October 2, 2016 at 8:57 pm #1199929
LelyModeratorHi There,
I tried to login and check but then the credentials is not working. It is throwing this error:
ERROR: The username or password you entered is incorrect.On my test site I got this:http://screencast-o-matic.com/watch/cD6eVLjtBt
But then it stop Cornertone because of the following error:The Content Security Policy 'default-src 'self' appointments-production-f.squarecdn.com; img-src 'self' data: api.mapbox.com square-go-production.s3.amazonaws.com/ www.google-analytics.com/collect appointments-production.s3.amazonaws.com/ appointments-production-f.squarecdn.com api.squareup.com/; script-src 'self' 'unsafe-inline' appointments-production-f.squarecdn.com js-agent.newrelic.com/ bam.nr-data.net/; style-src 'self' 'unsafe-inline' appointments-production-f.squarecdn.com' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no effect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header. builder.min.js?ver=1.3.0:1 Uncaught SecurityError: Blocked a frame with origin "http://virtualhost.dev" from accessing a frame with origin "https://squareup.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.October 3, 2016 at 9:50 am #1200531
breatheprana108ParticipantWhat should I do to remove this error? Do I need sorest up an API?
October 3, 2016 at 1:46 pm #1200840
Nabeel AModeratorHi again,
Instead of adding the above code in Raw Content, add it in your Child Theme’s functions.php:
add_action('wp_head','embed_code'); function embed_code() { ?> <script src="https://squareup.com/appointments/buyer/widget/d2f9c7e6-b202-48d2-94f0-6b1d7647566a/05FYBR52ZDJ10.js"></script> <?php }Let us know how this goes!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1197821 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
