Adding Facebook Icon to WordPress Blog
-
I have been looking all over the web for solutions to this, and everything I tried DOESN’T work. When I try and use HTML like this:
<ahref=”http://www.facebook.com/wanderloot”><imgsrc=http://wanderloot.files.wordpress.com/2011/02/facebook.jpg” />
HTML gets deleted from my Text Box after I save it. Why is this happening? Is WordPress blocking this for security reasons? It’s really maddening.
The blog I need help with is: (visible only to logged in users)
-
Could I please chime in with similar problem – I have widgets for FB icons on several blogs which I’ve tinkered the code so clicking on FB icon will open FB in a new tab. I am now trying to create the same type of widget for yet another icon – and when I paste in the html text, it all goes in EXCEPT the bit that would make it open in another tab – that disappears before my eyes when I hit save. The html that evaporates is ‘ target=”_blank” ‘ Why? Existing widgets still work fine – just can’t create this new one to do this. thanks.
-
oops – should add, working (old) fb widgets on http://winewomantravel.wordpress.com and http://malvedos.wordpress.com. Duff one, not working, is on a private test ground blog, http://sinthea.wordpress.com (FB badge having this problem is Aanifeira). thanks.
-
When you post code in the forum, you must enclose it in backticks so it displays properly, otherwise it gets stripped out or executed.
What theme is the private blog using?
-
@girleen: Hi. I don’t know if you intentionally removed the spaces here so that the link wouldn’t go “live” on these forums or if that’s actually what you tried inserting on your text widget. In any case, you might want to add the missing spaces and close the “a” tag, like this:
<a href="http://www.facebook.com/wanderloot"><img src="http://wanderloot.files.wordpress.com/2011/02/facebook.jpg" /></a>And raincoaster is right, it’s best to include the code between backticks (`)
-
-
Wow, very strange – it’s suddenly working, but the image is too large. Not sure what happened. It previously wouldn’t save! My apologies – don’t know how to post HTML on these forums. Thanks for the all the kind feedback.
-
Raincoaster sorry, I thought I was using backticks ‘ is what I thought was a backtick, but I do see the text displayed in my post above – it’s that [space]target = blank bit The theme on all three blogs is the same, twenty ten. I just tested again in sinthea – if I copy existing working code for a different facebook badge (I have two others set up in sinthea, one for graham’s and one for quinta de gomariz) into a new text widget box and save, it works fine. If I copy and paste the aanifeira fb badge code into the new text widget box, and hit save, the target equals blank phrase still evaporates. Based on airodyssey’s comments above I have checked very very carefully that placement within the rest of the badge code, the spacing, symbols, etc are same as working badges. No luck. Suggestions? Thanks. btw – can you get into sinthea to look at this? do I need to give you permission?
-
Oh. OH. Duh. Now I see what’s wrong.
I bet this is related to this being a private blog. Private blogs are, to say the least, non-optimized for sharing on Facebook or wherever. If you can UnPrivate it then things should work normally.
-
I thought about that too – but I have created two other facebook badges on this private blog – I use this as a test ground – and they work perfectly (just double checked one more time), including this aspect of opening in a new window. It’s the fact of that specific bit of code disappearing before my eyes when I save the widget for this third FB badge that REALLY has me stumped!!
- The topic ‘Adding Facebook Icon to WordPress Blog’ is closed to new replies.