• Resolved spespam

    (@spespam)


    Hello,

    Thank you for this plugin.

    I would like to use the stylised blue button AND HIDE the name of the file and the number of downloads. How can I do that ? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @spespam,

    To hide the download counter or other details you can first choose the template to display the download from the “Downloads > Settings” menu in your WordPress admin and for further customization, you will need to copy the templates from our plugin to your theme and modify them.

    You can learn more about it at https://www.download-monitor.com/kb/overriding-content-templates/.

    Thread Starter spespam

    (@spespam)

    Thank you for your reply.

    Will this work with a child theme ?

    Also, the template I use is content-download-button.php

    I’m a newbye so what should I remove in this code to hide the name of the file and the number of downloads? Thank you for your help.

    <?php
    /**
     * Download button
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    ?>
    <p><a class="aligncenter download-button" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    		<?php printf( __( 'Download &ldquo;%s&rdquo;', 'download-monitor' ), $dlm_download->get_the_title() ); ?>
    		<small><?php $dlm_download->the_filename(); ?> &ndash; <?php printf( _n( 'Downloaded 1 time', 'Downloaded %d times', $dlm_download->get_the_download_count(), 'download-monitor' ), $dlm_download->get_the_download_count() ) ?> &ndash; <?php $dlm_download->the_filesize(); ?></small>
    	</a></p>
    Thread Starter spespam

    (@spespam)

    I managed to do it by myself. Thank you for your help 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide counter hits’ is closed to new replies.