Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Código para eliminar el enlace de las imágenes en wordpress
- Este codigo debes de añadirlo en el functions.php
- add_filter( 'the_content', 'attachment_image_link_remove_filter' );
- function attachment_image_link_remove_filter( $content ) {
- $content =
- preg_replace(
- array('{<a(.*?)(wp-att|wp-content/uploads)[^>]*><img}',
- '{ wp-image-[0-9]*" /></a>}'),
- array('<img','" />'),
- $content
- );
- return $content;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement