Help with creating a space to show the code for my blog badge

  • Unknown's avatar

    correct you should source the image from your own site…

  • Unknown's avatar

    Oh it was your blog see very long day… LOL

  • Unknown's avatar

    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

  • Unknown's avatar

    @teck
    LOL…no wonder you had problems if you deleted the tag.

    My approach may be faster and easier, but you’re still correct in that the img src should be from the site that displays the badge, not from the site it is linking to.

  • Unknown's avatar

    I appreciate all the attention you’re giving this!

  • Unknown's avatar

    Your welcome.. tryingtobegreener, :)

  • Unknown's avatar

    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!

  • Unknown's avatar

    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.

  • Unknown's avatar

    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.

  • Unknown's avatar

    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.

  • Unknown's avatar

    (Oops – forget the backtick before the shortcode!)

  • Unknown's avatar

    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?

  • Unknown's avatar

    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!!! :-)

  • Unknown's avatar

    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?

  • Unknown's avatar

    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.

  • Unknown's avatar

    I’ll try tinyurl – thank you!

  • Unknown's avatar

    The code you give in your sidebar now links to your photobucket album, not your blog.

  • Unknown's avatar

    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.

  • Unknown's avatar

    How do I fix it soit goes to my blog?

  • Unknown's avatar

    The part within the first pair of quotation marks should be the address of your blog.

  • The topic ‘Help with creating a space to show the code for my blog badge’ is closed to new replies.