Need help? Check out our Support site, then


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

  1. tryingtobegreener
    Member

    Does anyone know how I can create within a text widget a clean, nice looking area (form field) where the code for my blog's badge can be for others to copy and then paste it on their own site/blog so their readers can come to me?

    All help is greatly appreciated!

  2. Here you go this FAQ entry should help you out

    Link » How do I post source code?

  3. tryingtobegreener
    Member

    Thank you!

  4. I don't think that is possible in wordpress.com, but there is a workaround. Assuming you are referring to your badge as an image linking to your site, you could use the "insert sourcecode" function to add the HTML code you want people to use. See: http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/

    Then you could add
    <a href="YOUR URL"><img src="URL OF YOUR BADGE"></a>
    between the sourcecode tags.

    Your readers can then just "copy to clipboard" and "paste" the code into their blog, assuming they know how to do this in HTML.

  5. tryingtobegreener
    Member

    Thanks wpvstp!

  6. Also you need to write the source code short cut in the HTML
    part of your editor... [ to achieve this click HTML tab]
    and paste the HTML code after your done doing that make sure
    to save it while your in the HTML format of your editor...

  7. I tried your work around wpvstp, and when I copy to clipboard and
    paste the code to my editor or sidebar text widget wordpress strips
    the image URL...

  8. I'm going to try a different work around and see that works I'll
    report back with my findings... :)

  9. tryingtobegreener
    Member

    Thank you so much teck07!

  10. @teck
    Thanks for the info. I never thought of actually trying this out. I assumed it would work.

  11. the HTML code wpvstp, provided does not work between the source code short cut
    what you need to do is upload your badge to your wordpress account insert it
    into the editor then highlight the image click the broken chain link icon then
    highlight image again click the chain link icon add your home page URL Click
    HTML tab write the source code short cut paste the short image HTML code between
    the source code short cut...

    Then when someone clicks copy to clipboard they will have the HTMl
    badge code that will provide the image badge and link back to your site... :)

  12. Your welcome!

  13. I wish there was a more simple workaround... :(

  14. @teck
    I'm not sure what you mean...and to be on the safe side I just tested my approach here:
    http://wpvstp.wordpress.com/2008/08/16/test-2/
    I had no problems in copying and pasting and saving the code in my text widget.

  15. Image links back to your site!!!

  16. So? Wasn't that what tryingtobegreener initially wanted? A badge/image that links back to his/her blog? In my case the image links back to MY blog. Same thing, or did I misunderstand?

  17. The HTML code wpvstp, provided does not work between the source code short cut

    Correct work around instructions

    1.what you need to do is upload your badge to your wordpress account

    2.insert it into the editor

    3.then highlight the image click the broken chain link icon

    4.then highlight image again click the chain link icon add your home page URL

    5.Click HTML tab write the source code short cut

    6.paste the short image HTML code between
    the source code short cut...

    final result

    when someone clicks the copy to clip board
    and pastes the HTML code to there there site
    they will have the badge that links back to
    your site...

  18. @wpvstp
    yes tryingtobegreener,
    wanted a badge linked back to there site
    but when I pasted the code you provided
    in between the source code short cut with
    the correct URL it stripped the image source link
    so basically the work around I provided goes the route
    of not using your code in between the source code short
    cut there was some extra tag need it for it to work and
    when I inserted my url and image source url in your code
    in between the source code short cut it was missing the close
    tag...

  19. @teck
    I think I get your point...rather than sourcing the image from someone else's site, you should source it from your own site? Fair enough...I was just trying to provide an easy solution. I still fail to see why the HTML code would not work.

  20. NO problem WordPress is funny like that I did leave a comment on his/her
    blog asking which work around they used it has been a very long day here
    and I might of accidentally missed something..

  21. correct you should source the image from your own site...

  22. Oh it was your blog see very long day... LOL

  23. 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

  24. @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.

  25. tryingtobegreener
    Member

    I appreciate all the attention you're giving this!

  26. Your welcome.. tryingtobegreener, :)

  27. tryingtobegreener
    Member

    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!

  28. 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.

  29. tryingtobegreener
    Member

    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.

  30. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.