Hi Arno,
thanks for your fast answer. I have tested your snippet, but it only shows the complete post page. After a little more research i found the following snippet (on https://ww.wp.xz.cn/support/topic/link-featured-image-on-post-to-show-large-size-in-lightbox/) which works for my OceanWP-Theme:
/* Link featured images to show in lightbox. */
function wpb_autolink_featured_images( $html, $post_id, $post_image_id ) {
if (is_singular()) {
$html = ‘‘ . $html . ‘‘;
return $html;
} else {
return $html;
}
}
add_filter( ‘post_thumbnail_html’, ‘wpb_autolink_featured_images’, 10, 3 );
If you think there is a optimization of the lines let me know.
fyi: URL is http://www.besser-verreist.de.
-
This reply was modified 1 year, 1 month ago by abesser.
Yannick,
thank you for your fast answer.
Setting a default link target as mentioned in your first post has solved my problem.
Andreas