Support » Fixing WordPress » Image Link to Post Permalink?

  • Is there anyway to have a default setting added to make the uploaded image lead to the permalink of the post?

    Also, is there a way to have a smaller image on the excerpt, and it becomes bigger when they view the full post? Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Okay, I figured out now the page link actually brings me to the post now.

    But is there a way to have a smaller image on the excerpt, and it becomes bigger when they view the full post? Thanks.


    It looks like in 2.3.1 the page link links indeed to the permalink of the post, but stubbornly keeps adding the image-title to this permalink, resulting in a 404, of course … Even when I delete this page title in the permalink in the code it just adds it back again upon saving …

    of course I can do this manually in the code, but no doubt it would be nicer to be able to do this with the normal editor ..

    any ideas?

    I am also getting the same problem eckelwood is getting.

    I did a bit more research into this. I suspected my own permalink setup may have been causing problems.

    Disabling permalinks does not fix the problem. Inserting an image into a post with link to page creates the following link
    instead of
    as I imagined it would.

    This may explain why duplicate titles occur, but I dont know how to fix it.

    I think there is a little confusion here about the upload file fuction.

    When you write a post and upload an image, and then choose the “link to page”, it doesn’t mean this image will link to the “post page” but to an “attachment page”

    let’s say you upload wathever.jpg…
    Then You have three choice :

    link to :

    file / a link directly to wathever.jpg

    page / a link to an attachment page containing wathever.jpg

    none / self explain, no link

    You can control the layout of the attachment page by editing “attachment.php” in your theme directory…

    In no way “link to page” means “link to post”…


    There is many way to do what you wanna do, a default setting for an image wich link to a post… The easyest one is to use the plugin post-image from Kaf. This is what I use.

    With this plugin, the FIRST image you will upload to a post can be called with a simple tag in your loop :

    <?php post_image(); ?>

    There is some argument you can add, to display either the full size, a thumbnail, etc, etc…

    Then, on your index or category page, you can use this tag to make a permalink to the post :

    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php post_image(); ?></a>

    You will find more instruction on the plugin’s page…

    Now, to display the thumbnail with the excerpt on the index page or in the category page, you just adjust the parameters of the post image tag…

    You use the thumbnail in index and category (and whereever you want).

    You use the full size on “single.php”.

    There is some other way to do so, with custom fields, or even with the post-slug, but this one is the easyest one…


    Thanks for the walk-through Simon!

    On an older WordPress blog I admin we’re using a plug-in called “Self Image” by Vaan Yob. You have to physically paste an HTML filepath to the image into a post, but then wrap it with that plugin’s custom tags. It’s a bit of work but achieves the intended purpose.

    I must say that I’m surprised that to-date WordPress has not included the ability that Stunt, the starter of this thread, has requested. This ability is one that’s seen on any number of popular websites (say Gizmodo or Engadget). It has become a common expectation that clicking the image will lead to the full article, not to a static page displaying the image or a “pseudo” page that has all the visual hallmarks of your site, sans the text that relates to the image.

    In fact, the more I think about it, it seems that the DEFAULT setting for WordPress would indeed be for the image to lead to the Single Page for the post.

    Styling the image’s size upward or downward could be achieved through CSS, as the Single Page and other pages have IDs that can be referenced to discriminate between each other.

    I wonder if there’s a way to submit a ticket for this, or if it has already been dealt with in version 2.5 of WordPress…

    I totally agree with drewprops. The DEFAULT setting for WordPress should be for the (first) image to lead to the full article! Right now, there is not even an option to do this.

    I am using the Guff plug-in now (‘Post image’) on my 2.5.1.-blog, but I think I am doing something wrong. <?php post_image(); ?> is in the loop, but images are displayed 2 times now on the front page.

    Can anybody help?

    Just to say thanks for the explanation: I was going CRAZY, trying to get the link on the first picture to link to the post.

    This really need to be an option when inserting pictures. If not even the DEFAULT setting!




    @pyrrho: I was having the same problem using the Guff plugin (post-image) – having double images.

    I used this plugin and it worked immediately upon activation – you don’t even have to edit the index pages.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Image Link to Post Permalink?’ is closed to new replies.