Archived topic
Head widget adding in tags when it's not in the widget code
1 reply · Started by Raziah on April 23, 2019
<div><a href="https://facebook.com/2d4d.art"><div></div></a></div><div><a href="https://instagram.com/2d4d.art"><div></div></a></div>
When I attempt to add social media sprites with a link, the code generated is different than that in the widget:
<div class="textwidget"><div><a href="https://facebook.com/2d4d.art"><p></p>
<div></div>
</a><p><a href="https://facebook.com/2d4d.art"></a></p></div>
<div><a href="https://instagram.com/2d4d.art"><p></p>
<div></div>
</a><p><a href="https://instagram.com/2d4d.art"></a></p></div>
</div>
CSS for the sprite is here:
#fb {float:right;display:block; width: 40px; height: 40px; background: url('https://www.2d4d.org/wp-content/uploads/2019/04/Socila-Icons_sprite.png') }
#ig {float:right;display:block; width: 40px; height: 40px; background: url('https://www.2d4d.org/wp-content/uploads/2019/04/Socila-Icons_sprite.png') -40px 0;margin-right:10px; }
#edl2 {
position: absolute;
top: 2px;
left: 0px;
width: 35px;
height: 35px;
background-color: transparent;
}
#edl1 {
position: absolute;
top: 2px;
left:45px;
width: 35px;
height: 35px;
background-color: transparent;}
Where did the <p> tags come from? Unable to get my links to display and there are duplicates, even though that is not what is in the widget code.
Hi there,
Have you considered using a plugin like Lightweight Social Icons?
https://wordpress.org/plugins/lightweight-social-icons/
I don't see any benefits of using the current method with the background images?