WPIntell

Source evidence

Alt + Title with fields

Multiple Featured Images · support · 2018-10-26T13:35:00+00:00

complaintsentiment
mediumseverity
0.75relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 33 rows with source links

12.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
yfchild unresolved
Hi. First thanks for your work. I love your plugin. Thanks very much for it. Second, how I can insert alt + title in 1 feature image? I try this: <?php $image = kd_mfi_the_featured_image( 'featured-image-1', 'full');?> <img src="<?php $image; ?>" title="<?php the_field('cat_item'); ?>" /> But doesn´t work. Can you tell me the way how you will dit it? Thanks This topic was modified 7 years, 7 months ago by yfchild . This topic was modified 7 years, 7 months ago by yfchild . Udpate for anyone need it with customs field : in your file content: <?php kd_mfi_the_featured_image ('featured-image-XXXXXXX', 'full');?> in your function.php function add_img_title( $attr, $attachment = null ) { $img_title = trim( strip_tags( $attachment->post_title ) ); $attr['title'] = get_post_field ('title_item'); $attr['alt'] = get_post_field ('alt_img_item'); return $attr; } add_filter( 'wp_get_attachment_image_attributes','add_img_title', 10, 2 );

Comments

1 shown
yfchild 2018-10-26T15:18:00+00:00

Udpate for anyone need it with customs field : in your file content: <?php kd_mfi_the_featured_image ('featured-image-XXXXXXX', 'full');?> in your function.php function add_img_title( $attr, $attachment = null ) { $img_title = trim( strip_tags( $attachment->post_title ) ); $attr['title'] = get_post_field ('title_item'); $attr['alt'] = get_post_field ('alt_img_item'); return $attr; } add_filter( 'wp_get_attachment_image_attributes','add_img_title', 10, 2 );