Post Image/thumbnail alt and title
-
Hi,
I am trying to remove the image/thumbnail “title and alt attributes”.
I tried to use this codeadd_filter( 'wp_get_attachment_image_attributes', 'remove_image_text');function remove_image_text( $attr ) { unset($attr['alt']); unset($attr['title']); return $attr;}
and tried
add_filter( 'related_posts_by_taxonomy_image_attributes', 'remove_image_text');function remove_image_text( $atts ) { unset($atts['alt']); unset($atts['title']); return $atts;} add_filter( 'related_posts_by_taxonomy_image_title', '__return_empty_string' );
Didn’t work.
Thanks
https://www.ads-software.com/plugins/related-posts-by-taxonomy/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Post Image/thumbnail alt and title’ is closed to new replies.