Call dynamic featured image to template file
-
Hi!
I have a template file that displays the default featured image as background image. I want to replace it with Dynamic Featured Image which I have set.
How can I do it; Unfortunately I don’t have enough knowledge to do that.
Can someone help me please?
Here is the source code:
<?php if(has_post_thumbnail()) { $image_url = get_the_post_thumbnail_url(get_the_ID(), 'medium'); $image_style = 'background-image: url('.esc_url($image_url).')'; ?> <div class="qode-ls-item-image" <?php echo bridge_qode_get_inline_style($image_style); ?>> </div> <?php }
Thanks
- The topic ‘Call dynamic featured image to template file’ is closed to new replies.