WordPress.org

Ready to get started?Download WordPress

Forums

get the image - linkt to image URL (2 posts)

  1. jordas
    Member
    Posted 2 years ago #

    Hi,

    I am using the get-the-image plugin to get a range of images and insert them into a slider. The plugin also allows to use the images as a link to the original post it came from. Now I would like to alter the script so it will link to the original url of the image. I found the place where I could alter this, but I'm not PHP-speaker enough to actually know what to write down here. This is where it adds the link to the original post:

    ` /* If $link_to_post is set to true, link the image to its post. */
    if ( $link_to_post )
    $html = '<a href="' . get_permalink( $post ) . '">' . $html . '</a>'`

    anybody any idea?

    thanks!

    J

  2. dsvakola
    Member
    Posted 2 years ago #

    Dear Jordas,

    I would rather suggest you to add your link like http://link_path.com between the quotes "" after the text $html = '<a href=""

    I hope your problem will be solved...

Topic Closed

This topic has been closed to new replies.

About this Topic