Tagged: x
-
AuthorPosts
-
June 26, 2016 at 11:15 pm #1060835
Hi,
I have been testing website speed and getting it improved step by step. I am also testing some plugins, that is, deleting them and testing the speed again. I just disabled this:https://reftagger.com/ plugin and the page load is fast! I have the code below that should go into footer template, but I am not sure where the template is. Where is it located, and how can I add this? Will it make any difference if I delete the plugin and JUST add this code, as far as the speed is concerned? (Google fonts api/etc etc are also slowing down the site, but that is next step :))
<script>
var refTagger = {
settings: {
bibleVersion: “NKJV”
}
};
(function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = “//api.reftagger.com/v2/RefTagger.js”;
s.parentNode.insertBefore(g, s);
}(document, “script”));
</script>June 26, 2016 at 11:30 pm #1060849Hello There,
Thanks for writing in! To resolve this in which you add a script in your footer, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Add script to the footer // ============================================================================= function add_custom_script(){ ?> <script> var refTagger = { settings: { bibleVersion: "NKJV" } }; (function(d, t) { var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.src = "//api.reftagger.com/v2/RefTagger.js"; s.parentNode.insertBefore(g, s); }(document, "script")); </script> <?php } add_action('wp_footer', 'add_custom_script'); // =============================================================================
We would loved to know if this has work for you. Thank you.
June 27, 2016 at 7:31 am #1061381Hi,
Thank you for your response!
When I added this code to the functions.php from within the dashboard > editor > functions.php, I get this line after updating the file.Parse error: syntax error, unexpected end of file in /home/joemad11/joelmadasu.com/wp-content/themes/x-child/functions.php on line 42
June 27, 2016 at 7:44 am #1061395Ok, when I copied and posted the code through Dashboard > Editor, it did not work and so it showed the above line error.
Now, I copied and pasted it through FTP, and it seems working! (though it started to slow down the site again. sadly.)Now, can anyone direct me how to set the expiration date? https://api.reftagger.com/v2/RefTagger.js (expiration not specified)
I uncluded the expiration date in htaccess for .js files/applications etc., but still this shows up.
June 27, 2016 at 8:10 am #1061424It looks like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.
-
AuthorPosts