noddemix
Forum Replies Created
-
Hi Andrea
Thanks for replying.
If I delete the plugin completely the code in the head is removed. Unfortunately the data remains in the database (‘widget_simple-social-icons’ table), so if I re-install the plugin then the old code that was inserted into the document head is inserted once again, despite the fact that all the associated widgets and inactive widgets have been deleted.
So once you add an SSI widget anywhere on a site there’s no getting rid of the stylesheet in the head of the document if you then intend to delete that widget and add another. Despite deleting the plugin and reinstalling, and deleting all associated widgets/inactive widgets, if I add a single SSI widget to the foot of my page I now see this in the document source:
<style type="text/css" media="screen">#simple-social-icons-1 ul li a,#simple-social-icons-1 ul li a:hover{background-color:#36f;border-radius:36px;color:#eee;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-1 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style><style type="text/css" media="screen">#simple-social-icons-2 ul li a,#simple-social-icons-2 ul li a:hover{background-color:#fff;border-radius:36px;color:#1a2f47;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-2 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style><style type="text/css" media="screen">#simple-social-icons-3 ul li a,#simple-social-icons-3 ul li a:hover{background-color:#fff;border-radius:36px;color:#1a2f47;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-3 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style><style type="text/css" media="screen">#simple-social-icons-5 ul li a,#simple-social-icons-5 ul li a:hover{background-color:#fff;border-radius:36px;color:#1a2f47;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-5 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style><style type="text/css" media="screen">#simple-social-icons-7 ul li a,#simple-social-icons-7 ul li a:hover{background-color:#fff;border-radius:36px;color:#1a2f47;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-7 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style><style type="text/css" media="screen">#simple-social-icons-8 ul li a,#simple-social-icons-8 ul li a:hover{background-color:#fff;border-radius:36px;color:#1a2f47;border:0 #fff solid;font-size:18px;padding:9px}#simple-social-icons-8 ul li a:hover{background-color:#bbb;border-color:#fff;color:#fff}</style>
As mentioned before, I’m able to rectify this by removing all references in ‘sidebars_widgets’ and the SSI table in the database, but this isn’t for the faint hearted.
No cache – the code simply isn’t being removed from ‘widgets_simple-social-icons’.
I tested on a fresh install to confirm.
Hi Andrea
That did work but surely the plugin should remove any code inserted into the header associated with a widget that’s been deleted? Anyone who played around with different positions for the icons will have a big chunk of totally useless code at the head of every page on their site.
From a performance/SEO point of view my main issue with WordPress is that WP/StudioPress and plugin developers never seem too concerned about code soup, erroneous code and bits of inline styling all over the place, which is why it can be so frustrating optimising a WP site.
Hi again
I managed to resolve this with some careful editing in “wp_options”, the following tables: “sidebars_widgets” to remove inactive icons, and “widgets_simple_social_icons” to remove associated settings. Less than ideal though. Hopefully there are no other tables with associated data that I need to worry about?