Viewing 11 replies - 1 through 11 (of 11 total)
  • Featured image links cannot be changed through the uploader, that only works for inserting pictures

    It would require a change to the php code in the appropriate template where you see the_post_thumbnail

    If your featured image links at all, that is coded into your theme

    Thread Starter cptrainer01

    (@cptrainer01)

    Thanks for the reply Rev. I found the_post_thumbnail in page-blog.php. I don’t know what code needs to be added to it to enable linking.

    Here’s what I see right now:

    <?php echo '<span class="featured-thumbnail-small">'; the_post_thumbnail('small-post-thumbnail'); echo '</span>'; ?> <!-- loades the post's featured thumbnail, requires WordPress 3.0+ -->

    [Please post code snippets between backticks or use the code button.]

    Thread Starter cptrainer01

    (@cptrainer01)

    I added the following bit of code and tested it, but it didn’t work. : (

    [Code moderated as per the Forum Rules. Please use the pastebin]

    To be able to link the thumbnail to a specified link, you need a way to put the link in.

    Unless you want all post thumbnails going to the same link.

    So most likely you would need to use custom fields. If you are setting this up for someone, and feel that custom fields might be hard for them to work with, you may need to go one step further and use a meta box which asks for a url. And use that output to insert a link for the image.

    The code above outputs the thumbnail, but no link. There must be more code which brings in the link?

    Thread Starter cptrainer01

    (@cptrainer01)

    Thanks for the reply Rev. Voodoo. I’ll look into creating a metabox. One more thing, I used the code you suggested adding to the functions.php file in the following thread: Making POST THUMBNAIL link to post – http://wordpress.org/support/topic/making-post-thumbnail-link-to-post?replies=13

    It worked BUT the slider on the same page as the thumbnail images ceased to exist. So, is there a line in the code you recommended on the above post that I can remove to keep the desired featured images working without effecting the slider above them?

    Well…. the problem is that affects all thumbnails.

    So that would also affect your slider if it uses the featured image. I have no idea how your slider is coded.

    generically speaking, within a template if you used something like:

    <a href=" link ">
    
    thumbnail code
    
    </a>

    That would wrap the thumbnail in a link. Within that link you could use get_post_meta

    http://vudu.me/bx is an article I wrote a bit ago, may help you if you are looking into meta boxes

    http://vudu.me/e9 has an example of get post meta in use

    Thread Starter cptrainer01

    (@cptrainer01)

    I solved this. I had to add a “text” widget to the menu and write the html needed to link the images.

    If anyone runs into this issue feel free to contact me at cptrainer01@yahoo.com for more details on how to solve it. It was a real pain for me.

    I had a similair problem to this for my own website http://dannyocallaghan.com
    On my galleries page i wanted the individual images to link to different galleries. However they where linking directly to the image.

    After around 3 hours of looking into this problem, I have found a way to make the images redirect to the correct URL.

    You will firstly need to get the plugin called ‘redirection’ you can find it here: http://urbangiraffe.com/plugins/redirection/

    Now follow these instructions to make your image link to your required URL
    1. Upload your image as normal
    2. Once uploaded go to the gallery tab in the image upload box.
    3. Now click the ‘attachment link URL tab
    4. Now on the Links to Thumbnails: select Attachment Page
    5. Now save all settings and update your gallery.
    6. Now go to your image and click it – It will go to a post page in your wordpress site.
    7. Next copy that post page link.
    8. Now goto the redirection plugin
    9. Once the plugin is open copy the post page link fromn point 7 to the source URL section of the plugin
    10. now put the URL address in the Target URL where you want the image to point to.
    11. Now goto your website and click the image – It will now be directing.

    This method works 100% of the time and i have wrtitten it down step by step, so if it doesnt work for you, then you are not doing something right.

    This is the page I have used it on http://dannyocallaghan.com/galleries/

    Thanks a bunch Danny!!! This worked like a charm and you just saved me from more headaches as I have been struggling for 3 days trying to change the featured links with no avail!! My freaking carousel script was using the featured images but I needed to display the full image instead of the post!! Now thanks to you and this plugin I was finally able to do it!

    I didn’t use the ‘redirection’ plugin that you suggested but the idea you shared was brilliant!! So I went for one called ‘Page Links To’ this one add a combo box on pages/posts/etc so you can put the URL you want that particular post to be redirected to… and it has an option to open the redirect on a new window; with a little tweak on the php I was able to make the images of my carousel open with “_self” so I could take advantage of the Slimbox plugin!!

    Again, thanks a lot man for this post!! This was driving me crazy as I’m not a programmer and was having a really hard time trying to solve this!

    I hope in the future WordPress will add that feature, because it’s a life saver when you are building portfolios and things like that!

    Rev. Voodoo could you help with this issue:

    I’m trying to use photobucket images as featured image on my wp site to reduce load on the server.
    But there are no simple way to use custom image url for featured images, probably I need the custom field function to achieve this but what I don’t get is how do I use individual external links for posts featured images
    I’m not really much of a techie, could you help with this? an working example and codes would be great.

    Thanks in advance.

    This was also a huge help for me. I was trying to link the featured image to an external url but the link url field wouldn’t save it. I used the redirection plugin mentioned above and it fixed the issues. Thanks for all the help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Featured image won't link to URL’ is closed to new replies.