Internal CSS and scripts
-
Hi,
I was using SSBA on my blog, but disabled it because of the internal CSS and Facebook SDK script added to all pages, even though I’d set the plugin to display on posts only. Is there a way to eliminate the following code from pages, and keep it on posts only?
Internal JS
<script>(function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <strong>Internal CSS</strong> <style type="text/css"> .ssba { } .ssba img { width: 35px !important; padding: 6px; border: 0; box-shadow: none !important; display: inline !important; vertical-align: middle; } .ssba, .ssba a { text-decoration:none; border:0; background: none; font-family: Indie Flower; font-size: 20px; font-weight: bold; } </style>
Call to external stylesheet
<link rel='stylesheet' id='ssbaFont-css' href='//fonts.googleapis.com/css?family=Indie+Flower&ver=7748950e511cc34fa6b83d5172ee0cae' type='text/css' media='all' />
Call to external JS
<script type='text/javascript' src='https://mitchellwhale.com/wp-content/plugins/simple-share-buttons-adder/js/ssba.min.js' defer='defer'></script>
If I’m going to use the plugin, I don’t want unnecessary code and server calls on WP pages, where the plugin isn’t being used.
- The topic ‘Internal CSS and scripts’ is closed to new replies.