Hello @cocciolina ,
The <?php $dlm_download->the_image(); ?> should have worked, just tested again on my end and works fine.
Could you please send a screenshot of the template you created? Or complete code, so we can check.
Warmly,
Razvan
Hello and thank you for your answer.
My complete template code is:
<?php
/**
* Default output for a download via the [download] shortcode
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
if ( ! isset( $dlm_download ) || ! $dlm_download ) {
return esc_html__( 'No download found', 'download-monitor' );
}
/** @var DLM_Download $dlm_download */
/** @var Attributes $dlm_attributes */
?>
<?php $dlm_download->the_image(); ?>
<a class="download-link<?php echo ( ! empty( $dlm_attributes['className'] ) ) ? ' ' . esc_attr( $dlm_attributes['className'] ) : '' ; ?>" title="" href="<?php esc_url( $dlm_download->the_download_link() ); ?>" rel="nofollow">
<?php $dlm_download->the_title(); ?> | <?php echo date("d-m-Y",$dlm_download->get_version()->get_date()->format( 'U' )); ?>
</a>
<p><?php $dlm_download->the_excerpt(); ?></p>
Everything works, except for the “<?php $dlm_download->the_image(); ?>” line.
Hello there,
I just wanted to know if you have some news on this?
Thank you!
Hello @cocciolina ,
Sorry for the late reply. I’ve put your code into a template and it seems to work, the thumbnail is there and displayed. Can you check if it’s not hidden by some CSS or removed by JS on your website?
Warmly,
Razvan
Hello Razvan,
thank you for your support. After updating the plugin, the featured images are working!
Thank you,
V
Very glad the problem has been resolved 😀
Have a wonderful day!
Razvan