Как автоматически убрать ссылки с изображений в WordPress

broken link big
In most cases (unless your theme is set up otherwise), you will find that images in a WordPress post are automatically linked to an image file page. Some may like that. Others, however, may not.

If you happen to be one that doesn’t, then there’s a quick and simple fix to this issue. You can place the following code (found at stackexchange) in your functions.php file. (Appearance > Editor > Theme Functions – functions.php)

add_filter( 'the_content', 'attachment_image_link_remove_filter' );
function attachment_image_link_remove_filter( $content ) {
 $content =
 '{ wp-image-[0-9]*" /></a>}'),
 array('<img','" />'),
 return $content;

And that’s it.