Community Forums › Forums › Archived Forums › General Discussion › Adding a footer script
- This topic has 9 replies, 2 voices, and was last updated 6 years, 11 months ago by Victor Font.
-
AuthorPosts
-
September 16, 2017 at 11:50 pm #211576Renu BakshiMember
I am using Genesis frame work and Modern Blogger Pro child theme. I want to add a jawascript just before the closing body tag. To do this I opened wordpress dashboard and clicked on gensis in the left side bar, clicked on Theme settings,put the jawascipt in the Footer Scripts box and clicked on saving. Cleared the browser's cache. But the jawascript code is not appearing in the document source.
Here is the jawascript: <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=c85c8855-aaf0-4059-b6eb-f49ba9614543"></script>
Please help.
September 17, 2017 at 5:54 am #211577Victor FontModeratorYou did what you were supposed to do. Please post a link to the site.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?September 17, 2017 at 7:42 am #211582Renu BakshiMemberThis reply has been marked as private.September 17, 2017 at 8:11 am #211584Victor FontModeratorYou may possibly have a plugin conflict. You have a couple of scripts that have been almost completely replaced with this: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?September 17, 2017 at 8:52 am #211587Renu BakshiMemberI need your help on two issues:
(i) Yes, I also saw this in the source code. I first used footer widget to place the jawascript immediately before end of the body, which I later came to know that a footer widget can be used for placing html code and not jawascript. I want to remove this now: </div></footer></div><script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=c85c8855-aaf0-4059-b6eb-f49ba9614543"></script> As this code is incorrect because I used footer widget for adding jawascript which is not the correct way. And I don't know how to remove this. Please advise how can I remove this code now?
(ii) As far as plugins are concerned, I am using latest versions of 4 reputed plugins only. (i) AdSense Integration WP QUADS (ii) Akismet Anti-Spam (iii) WP Smush (iv) Yoast SEO Premium. So, may be the problem is not due to plugins.
September 17, 2017 at 9:29 am #211591Victor FontModeratorThe amazon script is not on your site. I don't know what you mean with question 1.
Plugins, regardless of how reputable, can still cause problems. First try replacing the bad code with good code. If the bad code is still in your source, turn off all plugins. Does the problem go away? If so, turn them on again one at a time and see if the problem returns.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?September 17, 2017 at 9:41 am #211592Renu BakshiMemberI will turn of the plugins as suggested by you. But I don't know method to remove bad code. Can you please tell me how I can remove a code or bad part of a code?
Regards...... Renu Bakshi
September 18, 2017 at 5:32 am #211609Victor FontModeratorI can't tell you where the bad code is. It is not displaying on your site. You say it's in a footer widget, then delete the widget. It does not appear to be in your widgets though otherwise I would see it in your source code. If it's added through a WordPress hook in functions.php, then delete the code in that file. I can't help you further with this issue. The amazon code is not on your site. As far as I can tell, you have nothing to delete.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?September 18, 2017 at 5:48 am #211610Renu BakshiMemberVictor, Thank you so much for all your help and patience. I am not very familiar with coding and editing body section of my wordpress site. So, asking so many basic questions.
This is the code I am talking about: </div></footer></div><script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=c85c8855-aaf0-4059-b6eb-f49ba9614543"></script>
It's appearing in the source code. As far as I remember, I added this jawascript using footer widget. I came to know later footer widget can not add jawascript. I have already deleted this code from the footer widget, but it's still appearing in the source code. I want to remove it from the source code, but don't know how I can do it?
Thanks once again for all your help.
September 18, 2017 at 3:34 pm #211616Victor FontModeratorI see the code now. It is not in the footer widget area or even in the footer. It is in the after footer area. How it got there, I have no idea with out examining the admin area of your site. I can't do that though as a community volunteer. All I can suggest is look for code in functions.php, if you are using Genesis Simple Hooks, look in there, or see if you have a widget in the after footer area.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.