Home › Forums › Archived Forums › Weaver II Theme › Weaver II Pro › per Page Code Insertion
- This topic has 10 replies, 2 voices, and was last updated 6 years, 10 months ago by
scrambler.
-
AuthorPosts
-
January 18, 2015 at 18:38 UTC - Views: 4 #17401
ROBIN
ParticipantHelloI pasted some code into the following area:Per Page Code InsertionWeaver supports code and HTML insertion for the following areas. To add code, manually define the specified Custom Field Name and Value):
Define page-head-code, and the value contents will be added to the <HEAD> sectionThis is what I posted:<script type=’text/javascript’>(function () { var done = false;var script = document.createElement(‘script’);script.async = true;script.type = ‘text/javascript’;script.src = ‘https://app.purechat.com/VisitorWidget/WidgetScript’;document.getElementsByTagName(‘HEAD’).item(0).appendChild(script);script.onreadystatechange = script.onload = function (e) {if (!done && (!this.readyState || this.readyState == ‘loaded’ || this.readyState == ‘complete’)) {var w = new PCWidget({ c: ‘c12d7e7e-456e-4434-82cb-92f4c6e747bc’, f: true });done = true;}};})();</script>
Everything worked great yesterday. I only had the chat button showing up on the page I had inserted the code into.Today I went to work on the site and now I have the chat showing on every page. So I deleted the page entirely and I still have the code.I have no idea how to delete it from the site if I have to. What I would really like to do is just have it show on the one page I wanted it on.Can you help me?January 18, 2015 at 20:28 UTC - Views: 3 #20073scrambler
ModeratorPlease always give us a link to your site so we can be sure.
Make sure you have not inserted that code in a general area Like Advanced Options > Head section
January 19, 2015 at 00:09 UTC - Views: 2 #20074ROBIN
ParticipantSo Sorry Scrambler;
I promise I only put it in the per page code insertion area on the page I wanted the chat to show in Scheduled Chat.I typed: page-head-code, as the custom field name and then put the code in the value area. I am thinking that was the wrong thing to do. :o)I deleted the code out of the per page code area – page-head-code, on that page but it is still allowing the chat to pop into the screen.The website is ghost-talking.comI restored the deleted page just in case you needed to see that.I know I can just delete the chat plugin but I really would like to figure out how to make it work.Thanks!January 19, 2015 at 00:28 UTC - Views: 2 #20075scrambler
ModeratorYou have a script
<script src=”http://ghost-talking.com/wp-content/plugins/pure-chat/purechatwidgetcode.js?ver=4.1” type=”text/javascript”></script>
in the #weaver-final container of your page.
I don’t know anyway we can insert something there with the theme. May be @joy or @weaver can confirm if there is an option that does that or if your plugin could be the one inserting it there.
January 19, 2015 at 01:07 UTC - Views: 2 #20076ROBIN
ParticipantIf it had worked correctly did I place the script in the right place to begin with? Is that how I input something for just that pages Head section?
January 19, 2015 at 01:35 UTC - Views: 2 #20077scrambler
ModeratorYes you had it right.
You can put a script within the <script> tags in any Page insertion area using the page custom field. Depending when you need the script to run, you can put it at the top like you did, or in other areas like the post footer.
January 19, 2015 at 18:31 UTC - Views: 2 #20078ROBIN
ParticipantWould I remove that piece of code in the Editor portion of the Theme or in the FTP area? Either option scares the heck out of me, but I will do what I need to do.
January 19, 2015 at 19:22 UTC - Views: 2 #20079scrambler
ModeratorYou have to find out what is adding the code. You may want to ask the plugin developer if their plugin is doing that.
Never edit theme files.
January 19, 2015 at 19:40 UTC - Views: 2 #20080ROBIN
ParticipantI figured it out. I am doing a happy dance!
Just in case anyone else ever has this problem.I added the Chat feature plugin through plug in install for WordPress. What I didn’t understand was that when they offered HTML code it was for people that didn’t have such a great Theme as the Weaver II Pro theme that allows you to add it to the head for each page in WordPress. So It was like I added it twice.SO… I just deleted the plug in from the wordpress plugin area and added the HTML to Per Page Code Insertion area. Now everything is working like a charm.Thank you Scrambler for you patience and help!!!September 20, 2015 at 16:23 UTC - Views: 2 #20081ROBIN
ParticipantJust in case someone is having trouble finding the custom fields insert area, be sure to go to screen options and make sure the box is checked. With the last update the box was unchecked and I had a devil of a time finding it again.
September 20, 2015 at 19:14 UTC - Views: 2 #20082scrambler
ModeratorWordpress hides a lot of good stuff in these screen options on various admin pages 🙂
-
AuthorPosts
- The forum ‘ Weaver II Pro’ is closed to new topics and replies.