Я пытаюсь добавить вторичное изображение в качестве фона к шорткоду пользовательского типа записи.
new MultiPostThumbnails(array(
'label' => 'Case study Image',
'id' => 'third-image',
'post_type' => 'case_study'
) );
Затем я добавляю следующий фрагмент кода.
$img_name ='third-image'; //And so on
$img_id= MultiPostThumbnails::get_post_thumbnail_id(‘case_study’,$img_name,$post->ID );
$img_src_url= wp_get_attachment_image_src($img_id,'third-image');
<div id="case-study-all-featured-post" style="background-image: url('.$img_src_url.');">
<div class="all-case-study-title">
<h1 class="entry-title all-case-study-entry-title">
<a href="'. get_the_permalink() .'">'. get_the_title() .'</a>
</h1>
<a href="'.get_the_permalink().'" class="all-case-study-read-more">
<img src="http://dev.effectuspartners.com/new/wp-content/uploads/2019/09/read-arrow.png"> View Case Study
</a>
</div>
<div class="clearfix"></div>
</div>
Это мой кодПосле добавления $img_scr_url
изображение не отображается.