• Resolved khering

    (@khering)


    I would like to add target=”_blank” to the link for the sermon notes file. I have done so to the sm-template-functions.php file and it seems to work. Is there a way I can use my child theme to permantly make this change?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi,

    You can copy and edit the following code into your theme’s functions.php file:

    add_filter( 'sm_attachments_html', function () {
    	if ( ! get_wpfc_sermon_meta( 'sermon_notes' ) && ! get_wpfc_sermon_meta( 'sermon_bulletin' ) ) {
    		return '';
    	}
    
    	ob_start();
    	?>
    	<div id="wpfc-attachments" class="cf">
    		<p>
    			<strong><?php echo __( 'Download Files', 'sermon-manager-for-wordpress' ); ?></strong>
    			<?php if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) : ?>
    				<a href="<?php echo get_wpfc_sermon_meta( 'sermon_notes' ); ?>"
    						class="sermon-attachments"
    						download="<?php echo basename( get_wpfc_sermon_meta( 'sermon_notes' ) ); ?>">
    					<span class="dashicons dashicons-media-document"></span>
    					<?php echo __( 'Notes', 'sermon-manager-for-wordpress' ); ?>
    				</a>
    			<?php endif; ?>
    
    			<?php if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) : ?>
    				<a href="<?php echo get_wpfc_sermon_meta( 'sermon_bulletin' ); ?>"
    						class="sermon-attachments"
    						download="<?php echo basename( get_wpfc_sermon_meta( 'sermon_bulletin' ) ); ?>">
    					<span class="dashicons dashicons-media-document"></span>
    					<?php echo __( 'Bulletin', 'sermon-manager-for-wordpress' ); ?>
    				</a>
    			<?php endif; ?>
    		</p>
    	</div>
    	<?php
    
    	return ob_get_clean();
    } );

    Thank you for your patience.

Viewing 1 replies (of 1 total)

The topic ‘Modify Sermon Notes Attachment link’ is closed to new replies.