• Resolved McFarnell

    (@mcfarnell)


    With the latest version, our text editor broke. We were unable to add any text. I reverted to the previous version and it’s working again.

    Also, the custom label for preacher is not showing up on the sermon pages. It still says Preacher.

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,

    Apologies for the delay and thanks for the report!

    In what way did the text editor break? Could you please send a screenshot? What other plugins are active?

    Does the label issue still occur?
    We cannot reproduce it, preacher label is replaced correctly on archive and single sermon pages.

    Thread Starter McFarnell

    (@mcfarnell)

    Hi, the text editor seems to work now, but when you switch from Visual to Text, the text version looks kind of funny. But at least it works now. I would post a screen shot but see a place to upload one.

    The speaker issue has resolved as well.

    I now have another question: I used to have a “download” link of some sort, which would download the .mp3 file. That link appeared down under “Download Files”. Can I get that link back?

    Hi,

    Yup. Here you go:

    add_filter( 'sm_attachments_html', function () {
    	if ( ! get_wpfc_sermon_meta( 'sermon_audio' ) && ! get_wpfc_sermon_meta( 'sermon_notes' ) && ! get_wpfc_sermon_meta( 'sermon_bulletin' ) ) {
    		return '';
    	}
    
    	$html = '';
    
    	$html .= '<div id="wpfc-attachments" class="cf">';
    	$html .= '<p><strong>' . __( 'Download Files', 'sermon-manager-for-wordpress' ) . '</strong>';
    	if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) {
    		$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_audio' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_audio' ) ) . '"><span class="dashicons dashicons-media-audio"></span>' . __( 'MP3', 'sermon-manager-for-wordpress' ) . '</a>';
    	}
    	if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) {
    		$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_notes' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_notes' ) ) . '"><span class="dashicons dashicons-media-document"></span>' . __( 'Notes', 'sermon-manager-for-wordpress' ) . '</a>';
    	}
    	if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) {
    		$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_bulletin' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) . '"><span class="dashicons dashicons-media-document"></span>' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . '</a>';
    	}
    	$html .= '</p>';
    	$html .= '</div>';
    
    	return $html;
    } );

    Add the code to your (child) theme’s functions.php. ??

    Thread Starter McFarnell

    (@mcfarnell)

    Thank you! This works, but it appears it only works if there is another attachment to the post as well. Is there a way to tweak it so it works even if the MP3 files is the only file attached?

    Thank you.

    Yup – copy this* and add it before or after the function from previous reply. ??

    —-
    * without <?php tag

    Thread Starter McFarnell

    (@mcfarnell)

    Thanks! I added this, but it still is not showing unless there is another attachment with the sermon. Any other ideas?

    Hmm, weird. Are we talking about single sermon views?

    Thread Starter McFarnell

    (@mcfarnell)

    Yes, that is correct. Single sermon view.

    Thread Starter McFarnell

    (@mcfarnell)

    Any other thoughts on this? Should I open a new thread, since this is marked as resolved? I still don’t have a download link for the MP3 files, unless there is also a file attached. See here: https://www.woodlandchristian.net/messages/acts-242-47-week-3-and-acts-3-44-week-1-acts-to-the-end-of-the-earth/

    Hi @mcfarnell,

    Sorry for the delay, I had to code a feature first to have this possible to do, in a less-hacky way, but it… took a bit.

    Anyway, once Sermon Manager 2.13.0 is released, there will be new files in /views directory, you’ll need to copy them to your theme, specifically content-sermon-single.php and content-sermon-attachments.php.

    After that, please add the following code after </strong>, in content-sermon-attachments.php:

    
    		<?php if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) : ?>
    			<a href="<?php echo get_wpfc_sermon_meta( 'sermon_audio' ); ?>"
    					class="sermon-attachments"
    					download="<?php echo basename( get_wpfc_sermon_meta( 'sermon_audio' ) ); ?>">
    				<span class="dashicons dashicons-media-audio"></span>
    				<?php echo __( 'MP3', 'sermon-manager-for-wordpress' ); ?>
    			</a>
    		<?php endif; ?>
    

    And please replace the code on line 103, in content-sermon-single.php, with:

    
    <?php if ( get_wpfc_sermon_meta( 'sermon_notes' ) || get_wpfc_sermon_meta( 'sermon_bulletin' ) || get_wpfc_sermon_meta( 'sermon_audio' ) ) : ?>
    

    That should do it. ??

    Thread Starter McFarnell

    (@mcfarnell)

    Thank you. I copied content-sermon-single.php and content-sermon-attachments.php directly into my theme folder. That is correct right? Not into a /views folder or a /partials folder?

    I also made the changes you mentioned to those two files.

    However, the download link is still not working.

    I didn’t copy all of the other files from the /views folder. Do I need to do that?

    –Matthew

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Latest Version: Text Editor, label for Preacher’ is closed to new replies.