how to disable image links in catalog page
-
Hello,
I’m trying to disable the image links in woocommerce main catalog page, so that it wouldn’t be possible to access the single product’s detail page.
The site is: http://omundoculturaenatureza.com.br/?post_type=productI’ve tried to paste this code into the functions, but it affects ONLY the one page I don’t wish to be affected, the home.
/* code from the page http://wordpress.stackexchange.com/questions/33724/remove-links-from-images-using-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; }
How can this be done?
Thanks, Priscila.
- The topic ‘how to disable image links in catalog page’ is closed to new replies.