{"id":207,"date":"2019-02-27T15:06:14","date_gmt":"2019-02-27T15:06:14","guid":{"rendered":"https:\/\/rockythemes.com\/nimva3\/docs\/?p=207"},"modified":"2019-02-27T15:06:14","modified_gmt":"2019-02-27T15:06:14","slug":"adding-custom-code-javascript-before","status":"publish","type":"post","link":"https:\/\/rockythemes.com\/nimva3\/docs\/adding-custom-code-javascript-before\/","title":{"rendered":"Adding Custom Code (JavaScript) before <\/body>"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Sometimes it is needed to add custom JavaScript codes before the closing &lt;\/body> of your site. Instead of modifying the core files of the theme and losing these changes on future updates or breaking your site completely, navigate to Theme Options -> <strong>General Settings -> Tracking Code \/ Header Code \/ Body Code<\/strong> section and paste your code under the <strong>Code before &lt;\/body><\/strong> section<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"867\" height=\"331\" src=\"https:\/\/rockythemes.com\/nimva3\/docs\/wp-content\/uploads\/2019\/02\/code-before-body.jpg\" alt=\"\" class=\"wp-image-208\" srcset=\"https:\/\/rockythemes.com\/nimva3\/docs\/wp-content\/uploads\/2019\/02\/code-before-body.jpg 867w, https:\/\/rockythemes.com\/nimva3\/docs\/wp-content\/uploads\/2019\/02\/code-before-body-300x115.jpg 300w, https:\/\/rockythemes.com\/nimva3\/docs\/wp-content\/uploads\/2019\/02\/code-before-body-768x293.jpg 768w\" sizes=\"auto, (max-width: 867px) 100vw, 867px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The code added here will be placed in the header, before the closing &lt;\/body> tag.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to add custom JavaScript before the closing <\/body> tag without changing footer.php<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-getting-started"],"_links":{"self":[{"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":1,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/posts\/207\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rockythemes.com\/nimva3\/docs\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}