Image post: image isn't linked to the entry – Solution?

Viewing 13 posts - 1 through 13 (of 13 total)
  • #7756
    staud
    Participant

    Hey together,

    I have a problem.

    On the blog page, within the “image-post” entries, the image itself isn’t linked to the entry. The entry title (headline) is the only link to the entry. When clicking on the image, the image file itself opens.
    On the Pinboard theme demo site, however, you can access the full entry by clicking either on the title or on the image. This is how it should be: user friendly.

    I guessed the problem might have something to do with the Next Gen Gallery Plugin or the Next Gen Gallery Optimizer plugin, but deactivating both didn’t help.

    By now, I’m quite despair. Can you help me?
    Thanks a lot in advance!

    #7795
    gindavall
    Participant

    Same problem here. When using the image post format, clicking on the image (when viewing an excerpt on a pinboard style page) will cause the image to open up in a lightbox rather than going to the post itself. To make matters worse, if you have several image posts on a page, all of those images will open in that lightbox.

    Needless to say, I do not want this. How can I disable this function?

    The only reason I am using an image post format instead of standard is because the image I am using isn’t hosted on my site. It’s hosted elsewhere and therefore can’t be used as a featured image. Without a featured image, there is no image showing on the except on a pinboard style page.

    This is also a problem for the gallery style post. The thumbnail for the gallery posts only uses three images. Clicking on it gives a lightbox of those three images only, rather than going to the gallery post itself.

    #9645
    shaunster
    Participant

    I am really trying to figure this out too. I have spent a few hours trying different things. Does anyone know of a reference or solution?

    #10571
    Daniel Tara
    Keymaster

    That’s the only difference between posts with the image format and posts with the standard format. So, if you don’t want the image to link to the preview then use the standard post format.

    #10576
    gindavall
    Participant

    Daniel, as I stated above, I am having to use the image post format because that’s the only way I can make the excerpt have an image. I can’t set a featured image when the image isn’t hosted on my site. Otherwise I would use a standard post format.

    And please help with the related issue of the thumbnail of a gallery post opening into a lightbox with only three images rather than going to the gallery post itself.

    Something in code tells the thumbnail image to open in a lightbox rather than going to the post. I would like to change that. Where do I find it?

    #10591
    gindavall
    Participant

    My apologies, Daniel, I found my error and I can, in fact, use a standard post format for my needs.

    However, the thumbnail of the gallery opening to a lightbox of just the three images is still problematic.

    #10604
    Daniel Tara
    Keymaster

    For both cases you can change this in functions.php function pinboard_post_image() and pinboard_post_gallery() respectively, replace any instance of:

    $image = wp_get_attachment_image_src( $attachment->ID, 'full' ); echo $image[0];

    with this:

    the_permalink();
    #10615
    gindavall
    Participant

    Thanks Daniel. I had to also remove a bit more code but at least I have it working the way I want. Excellent! Thank you!

    #11296
    JFaulkner01
    Participant

    what did you remove gindavall? please help .

    #16477
    zweet16
    Participant

    I would like to know what you removed also gindavall. Thanks!

    #16488
    zweet16
    Participant

    Hi I tried doing what you said Daniel and it takes it to the post but it opens it in Lightbox. What else do I need to change to get it to work right?

    #16489
    zweet16
    Participant

    I have found the solution:

    in functions.php, look for pinboard_post_gallery(), mine is on Line 1953

    Replace:
    <a href="<?php $image = wp_get_attachment_image_src( $attachment->ID, 'full' ); echo $image[0]; ?>" class="colorbox" title="<?php echo esc_attr( get_the_title( $attachment->ID ) ); ?>" rel="attachment">

    with:
    <a href="<?php the_permalink(); ?>">

    #21632
    juliejernigan
    Participant

    zweet16 – perfect solution, thanks!

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.