New Landing How can we help? Themeforest Theme Support Joyn how to change the target button "Télécharger le pdf"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Joyn
  • #160745
    blaouchez
    Member
    Post count: 448

    Hello,

    how to change the target button “Télécharger le pdf”
    I want the file opens in a new page (blank)

    Regards

    #161035
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Add the code below to your child theme functions.php

    
     /* POST DOWNLOAD
        ================================================== */
        if ( ! function_exists( 'sf_post_download' ) ) {
            function sf_post_download() {
                global $post;
                $download_button    = sf_get_post_meta( $post->ID, 'sf_download_button', true );
                $download_file      = sf_get_post_meta( $post->ID, 'sf_download_file', true );
                $download_text      = apply_filters( 'sf_post_download_text', __( "Download", "swiftframework" ) );
                $download_shortcode = sf_get_post_meta( $post->ID, 'sf_download_shortcode', true );
                if ( $download_button ) {
                    ?>
                    <div class="post-download">
                        <?php if ( $download_shortcode != "" ) {
                            echo do_shortcode( $download_shortcode );
                        } else {
                            ?>
                            <a href="<?php echo wp_get_attachment_url( $download_file ); ?>"
                               class="sf-button accent" target="_blank"><?php echo $download_text; ?></a>
                        <?php } ?>
                    </div>
                <?php
                }
            }
        }

    -Rui

    #161255
    blaouchez
    Member
    Post count: 448

    Perfect ! thanks Rui !!

    #161264
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem. Glad I could help.
    -Rui

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register