Help with creating a space to show the code for my blog badge
-
-
-
I see my problem
My apologies to wpvstp,I accidentally deleted the
</a>
from the code and didn’t realize it…I agree your way is faster and easier
and should be used over mine… :)Teck
If staff reads this thread please delete my work around
-
-
-
Please help. I’ve tried wpvstp’s instructions that he/she first lists above and I seem to be doing something wrong. Please look at my blog at the last text widget.
The top image is html from photobucket where I placed my badge. Below it should just show code so that readers can copy it and then put it on their blog/site. When their readers then click the image, it will link to my blog. Here is what I have for the code (in my text widget) on the bottom image that, as I said, should only show code, not the actual image:
[sourcecodelanguage='css']<a href="http://tryingtobegreener.wordpress.com"><img src="<img src="http://i518.photobucket.com/albums/u342/tryingtobegreener/TryingToBeGreenericon.png" border="0" alt="Trying To Be Greener"></a>"></a>If you know what I’m doing wrong, please help. I really appreciate it!
-
If I’m not mistaking, you’re missing the closing [/sourcecode].
I would use ‘html’ instead of ‘css’ though it wouldn’t make any difference.
-
I’ve tried adding that so all together it looks like this now:
[sourcecodelanguage='css']<a href="http://tryingtobegreener.wordpress.com"><img src="<img src="http://i518.photobucket.com/albums/u342/tryingtobegreener/TryingToBeGreenericon.png" border="0" alt="Trying To Be Greener"></a>"></a>[/sourcecode]Still not working, as you can see from my blog again.
Thanks for the suggestion, though.
-
The code for an image that acts as a link is:
<a href="targetURL"><img src="URLofuploadedimage"></a>
For a text widget, the URL of the image should be up to the “png”.The shortcode for displaying the code is:
`[sourcecode language='html']YOUR_CODE_HERE[/sourcecode]
But you want like the result you’ll get in the text widget. -
-
panaghiotisadam,
Forgive me for sounding stupid – should I just copy the code you gave but just replace “URLofuploadedimage” with the actual url? That’s it?
-
panaghiotisadam,
OK, so I changed it to what you said and I think I have it. But I don’t know for sure. Could someone copy and paste to see if it now liks to me? I’d really apprecaite it!
Thanks everyone who’s helped out!!! :-)
-
If you’re talking about the first code, “targetURL” should be the URL of your blog and “URLof…” the URL of the image (in this case “http://i518.photobucket… etc.) But that’s the code for an image that will act as a link, and you’ve done that successfully in your sidebar.
The same bunch of code should be enclosed in the “sourcecode” shortcode if you want to have it displayed. I see you’ve now tried this in your blog: the code you put is wrong, but anyway do you like the result?
-
That’s the best you’re going to get I guess, though it doesn’t look pretty (as someone said above). I would still try to shorten the code by using either bit.ly or tinyurl. Either case, it appears to be working fine for what you wish to do.
-
-
-
Plus, I think you should also add a short explanation in the text widget, as it won’t be obvious to everyone what that is supposed to be.
-
-
- The topic ‘Help with creating a space to show the code for my blog badge’ is closed to new replies.