Custom Link URL for image switches back to image URL

  • Unknown's avatar

    When I am posting, and insert an image, I would like to make the Link URL a custom link (that is, neither “current link” nor “link to image”). But when I paste my custom link in to that field, click “update,” and then check again, it is always back to the image URL. What am I doing wrong?!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The site linked to your nick isn’t a wp.com blog.

  • Unknown's avatar
  • Unknown's avatar

    Much better, thank you! Now if you’d also care to explain “custom link”… Do you mean you want the image to link to another site or what?

  • Unknown's avatar

    Yes, just link to another site. Like for instance, I’d like the Sentencing Project image to link to their home page, not some weird page that shows that same image in some of other context on my blog. Does that make sense? Thank you!

  • Unknown's avatar

    You can easily do that with html coding (in the html post editor of course) instead of wasting time with the “Advanced Settings” of the image editor. The model is this:
    <a href="URL_OF_SITE_HERE" target="_blank"><img src="URL_OF_IMAGE_HERE"></a>
    The proper URL is the one you get if you click File URL after uploading the image.

    If the image is wider than your main posts area, you need this variant:
    `<img src=”URL_OF_IMAGE_HERE” width=”NUMBER_HERE” />
    In the theme you’re using, the number should not exceed 480.

  • Unknown's avatar

    Sorry, forgot to close the code box – second code is
    <a href="URL_OF_SITE_HERE" target="_blank"><img src="URL_OF_IMAGE_HERE" width="NUMBER_HERE" /></a>

  • Unknown's avatar

    “easily” is a relative term. So I paste “

    <img src=”URL_OF_IMAGE_HERE”>

    somewhere in the post? Where exactly? And I have to paste the two URLs in each time?

    Thanks.

  • Unknown's avatar

    While you are editing the post, switch to HTML and find this code:

    <p style="text-align:center;"><span><a rel="attachment wp-att-263" href="http://springfieldinstitute.wordpress.com/2009/03/03/parents-who-go-to-prison-do-not-suffer-the-consequences-alone/picture-5/"><img class="aligncenter size-full wp-image-263" title="picture-5" src="http://springfieldinstitute.files.wordpress.com/2009/03/picture-5.png?w=468&h=70" alt="picture-5" width="468" height="70" /></a><br />
    </span></p>

    change this part:
    … href="http://springfieldinstitute.wordpress.com/2009/03/03/parents-who-go-to-prison-do-not-suffer-the-consequences-alone/picture-5/"><img class="aligncenter size-full wp-image-263" title="picture-5" …
    to this:
    … href="http://www.sentencingproject.org/PublicationDetails.aspx?PublicationID=634" …

  • Unknown's avatar

    “Easily” is a relative term. Well, agree – should have said “easier than the other way”! The other way is: upload the image (in the visual editor), click File URL, click insert, then click on the image, click the mountain icon that shows up, paste the URL of the site in the link box, click Advanced Settings, scroll down to Target and select the “Open link in a new window” option, then click Update. If you do it with code, you start the same way (in the html editor), but after inserting the image you just replace the ref part of the code with the site URL and the target attribute.

    “Where exactly?” Where you want the image to show up in relation to the text.

    “And I have to paste the two URLs in each time?” I don’t understand this question.

  • Unknown's avatar

    panos,
    You are brilliant, but you have to remember that a novice is scared to look at HTML. A year ago, I was too terrified to even look at that indecipherable code, lest I make a “fatal” mistake. But I made an effort to learn a bit about HTML because I’m a bit geeky, and also thanks to your inspiration to try. HTML really is sort of understandable.

    I’ve just had a sort of disruptive phone call, (more personal info for this forum than necessary for this forum)

    But I was thinking to define the terms in:
    <a href="URL_OF_SITE_HERE" target="_blank"><img src="URL_OF_IMAGE_HERE" width="NUMBER_HERE" /></a>
    “href=” is the place your want to link to
    “img src=” is the picture to display
    and finally:
    “width=” is the size of the picture

  • Unknown's avatar

    The two URLs are href and img src
    grrrr
    I think I’m making a mess of this. Sorry.

  • Unknown's avatar

    Thanks guys. At this point I think I never was doing anything wrong. All I should have had to do was put my own URL in the field “Link URL” (http://www.ehponline.org/members/2008/11590/11590.html), click update, and then click “update post.”

    Right? That worked in most cases, but that one post (NYC walkability) keeps switching back to:

    Picture 4

    Same thing happens when I use the HTML approach you describe.

    Thanks again.

  • Unknown's avatar

    @Tess:

    https://en.forums.wordpress.com/topic/how-do-i-add-a-button-in-my-side-bar-digg-3-theme?replies=11#post-304332

    You’re right, and I agree, but I think that eventually one is going to need at least some html if he or she is really interested in blogging (you can testify to that!); so I always try to prompt towards that direction, and I’m always glad if I can make others less scared of the monster.

    And goldman is a smart guy – I really liked his “How’s that?” response!

  • Unknown's avatar
  • Unknown's avatar

    @goldman5: Please give the link to the post in question so we don’t have to search the whole blog!

  • Unknown's avatar

    Right, (I think.)
    The visual editor seems to change the HTML code sometimes. if you switch from HTML to visual. It seems to stay ok if you stay in HTML.

  • Unknown's avatar

    panos,
    I was not being negative—knowing a little HTML is very useful, but some people need a bit of hand holding to begin. Maybe I’m imagining, but some time ago you gave more details about how to do things, or explanations about what really basic codes meant. It might be me mis-remembering and it might be that I’m a bit upset right now. Sorry, it’s probably my mode right now.
    I will step back, and perhaps look in a new light tomorrow. Wish me best.

  • Unknown's avatar

    Who said you were being negative?

    Wish you best? ALWAYS!!!!!!!!

  • Unknown's avatar

    Here’s the post in question:
    http://springfieldinstitute.wordpress.com/2009/03/03/walkable-healthy-food-options-predict-obesity-in-nyc/

    And nope. Even when I leave in HTML, when I replace this:
    href=”http://springfieldinstitute.wordpress.com/2009/03/03/walkable-healthy-food-options-predict-obesity-in-nyc/picture-4/”

    With this:
    href=”http://www.ehponline.org/members/2008/11590/11590.html”

    And then click the blue “Update Post” button on the right, it magically switches back to the original:
    href=”http://springfieldinstitute.wordpress.com/2009/03/03/walkable-healthy-food-options-predict-obesity-in-nyc/picture-4/”

    I guess that’s the same thing that is happening when I use the Visual editor. I will get no pleasure from having discovered a big bug. Thanks all.

  • The topic ‘Custom Link URL for image switches back to image URL’ is closed to new replies.