Need help? Check out our Support site, then


Help! Code in Text widget keeps changing by itself!!

  1. oh no! The code I typed in here has changed too into links!!

    OK, I'm going to try and type the message again with spaces - hope it remains this time so you can see what I'm actually typing:

    -----------------------------------------------------------
    Aaarrggh!! This is so frustrating -

    I want to put an image in my sidebar (a picture of the 1st page of an article) and when you click on the image, it will then take you to the PDF of the article.

    I've done this using a Text widget in my sidebar and for each image/article, I have put first the link code < a href = "... ( etc)> and then inside that, the image code (< img src="...">etc).

    I am using just 1 Text widget box.

    I have done this successfully for the first 2 images/articles - but for some reason, with the next 4 images/articles, every time I click "Save Changes" - the code alters by itself so I end up losing all the code in the section! So the image shows up fine in my sidebar but it won't link to anywhere.
    When I go back to look at the Text widget contents, the whole < a href > bit has shrunk to - < a >??
    Why? I have tried several times retyping it but it keeps doing this!

    For example - here is what I type in initially:

    Pet Magazine - Aug 2007</br>
    < a href = " http://bighoneydog.wordpress.com/files/2008/11/petmag-offleash.pdf " >
    <img src=http://bighoneydog.wordpress.com/files/2008/11/petmag-collage1.jpg" alt="" title="">

    But after I click on "Save Changes" - it changes to:

    Pet Magazine - Aug 2007</br>
    < a >
    <img src=http://bighoneydog.wordpress.com/files/2008/11/petmag-collage1.jpg" alt="" title="">

    But how come the first 2 images/articles in the list worked fine?
    Can you only have a maximum of 2 image links in a text widget?

    Thank you -

  2. You have to put code between backticks (the key to the left of the #1 key with the ~ on it).

  3. - No there's no limit to the number of image links.

    - The correct code is:
    <a href="URL_OF_PDF"><img src="URL_OF_IMAGE"></a>
    But your images are larger than your sidebar, so use the plus-width-attribute version:
    <a href="URL_OF_PDF"><img src="URL_OF_IMAGE" width="160px"></a>
    - You're using the break tag wrong. In contrast to most other tags, there's no opening and closing br; there's only one tag, signifying line-break, and it's this:
    <br />
    - But you don't need it in this case; for blank space before each legend use this (you may adjust the number as you see fit):
    <p style="padding-top:3em">TEXT_HERE</p>

  4. Sorry, I don't understand - I AM doing the code as you say -

    first the < a href (URL of PDF) > business and then the < img src (URL of IMAGE) > bit - as I said, I worked fine for the first 2 images in the list but with the remaining 4, everytime I click "Save Changes" - the code seems to automatically change byitself so I lose everything in the first set of brackets and all I can see is < a > - why is it doing this??

    If it works for the first 2, then it should work for the others surely? Why should code change byitself anyway?

  5. @bighoneydog: I see you corrected things. Anyway, if you still need an answer, code may "change by itself", that is get stripped off, if it's invalid. No, you weren't doing the codes as I said: among other things, you had omitted the necessary quotation mark before http in the image part of the code.

Topic Closed

This topic has been closed to new replies.

About this Topic