Answers for "img tag in wordpress"

PHP
1

img src php wordpress

/*Va directement dans le repertoire du theme parent puis dossier img*/
src="<?php bloginfo('template_url'); ?>/imag/chat.png"
Posted by: Guest on November-21-2020
0

wordpress thumbnail image with picture tag html

<?php 
	// Get this attachment ID
	$attachment_id = get_post_thumbnail_id( $post_id );
	$image_large_src = wp_get_attachment_image_src( $attachment_id, 'large' );
?>

<picture>
	<!-- Large art direction resolutions -->
	<source media="(min-width: 50rem)"
		srcset="<?php echo wp_get_attachment_image_srcset( $attachment_id, 'large' ); ?>"
		sizes="(min-width: 60rem) 60rem, 100vw">

	<!-- Small art direction resolutions -->
	<source 
		srcset=&quot
Posted by: Guest on March-15-2021

Browse Popular Code Answers by Language