If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #22823


    on the blog page’s images the permanent link is set to the individual entry. (Blog overview page)

    I’d like to change this to a simple lightbox link; no link to the entry itself.

    Or – in other words: image link should be the same as on the single blog page.

    Would be kind if you could point me into the direction of where I can change this. Must be somewhere in the loop-index.php but I’m not sure which lines to change properly. Thanks.

    Regards Katharina



    What about the link from the blog archive to the blog post? Since there is usually an image, a title link and an excerpt. The image link you want to open a prettyphoto lightbox, but the title link?



    Hi Nick,

    thanks and yes: image link should open prettyphoto lightbox.

    I already got rid of the title link by modifying the loop-index.php file. You can view blog overview page here bonath-werbung.de/?page_id=956

    Regards, Katharina



    You may have moved something that wasn’t supposed to be moved, unless this is the look you are trying to achieve – http://www.clipular.com/c?5436093=ytgjyUmI6ynd3hIeVqEfXAa720k&f=.png





    You need to replace lines 51-55 in file loop-index.php that look like

    $image = get_the_post_thumbnail( get_the_ID(), $size );
    $image = "<a class='external-link $class' href='".get_permalink()."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."'>".$image."</a>";
    echo $image;

    and replace them with the code below

    $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large');
    $image = get_the_post_thumbnail( get_the_ID(), $size );
    $image = "<a rel="prettyPhoto" class='external-link $class' href='".$large_image_url[0]."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."'>".$image."</a>";
    echo $image;




    oooops, might be; looks fine on my 1920×1080 resolution. Thanks for mentioning. I’ll check later

    thanks, katharina



    I hope it worked?

    Best regards,




    I tested it, so fairly certain it does. ykblue?




    Hi, works fine. Thanks a lot – I know that I asked for more than usual. Double thanks.

    My ooops-post swooshed inbetween and referrs to Nick’s hint to my modifications mish-mash which I had no time yet to check yet.

    Best regards, Katharina

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

The topic ‘Change permanent link on blog image (overview page) to lightbox popup’ is closed to new replies.