• Resolved cjmclean

    (@cjmclean)


    Hi there,

    I’m looking to change the text on the download button to not show the title or the download count. I’ve managed to remove the download count but how do I remove the title as well. Here is the code change in the content-download-button.php

    <?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( esc_html__( 'Download &ldquo;%s&rdquo;', 'download-monitor' ) , wp_kses_post( $dlm_download->get_title() )); ?>
    	</a>
    </p>

    I tried removing this part

    , wp_kses_post( $dlm_download->get_title() )

    but I ended up with an error.

    Any help would be greatly appreciated!

Viewing 1 replies (of 1 total)
  • Plugin Author Razvan Aldea

    (@raldea89)

    Hello @cjmclean ,

    Please try the following:

    Remove

    <?php printf( esc_html__( 'Download &ldquo;%s&rdquo;', 'download-monitor' ) , wp_kses_post( $dlm_download->get_title() )); ?>

    And add:

    <?php echo esc_html__( 'Download', 'download-monitor' ); ?>

    Keep in mind that if you did not copy this did template and added in your theme, on the next plugin update it will revert back to the original ( here’s a link to the docs in case you did not override the template ).

    Kind Regards!
    Razvan

Viewing 1 replies (of 1 total)
  • The topic ‘Custom text on Download button’ is closed to new replies.