Changing the email digest template just a little

I wanted to move the Subtitle Text that you can customize in the Preview Digests Template to be right under the logo instead of under the Mail Subject. How would I do this? I thought I could just go into the mail-template.php file but that didn't work. Any help would be appreciated!

  • Kasia Swiderska
    • Support nomad

    Hello Gwindylyn,

    To override default template please follow those instructions from Mail Template tab in plugin setting:

    Move any file in /wp-content/plugins/subscribe-by-email/inc/mail-templates/views/ to /wp-content/themes/YOURTHEME/subscribe-by-email/ an edit them for changes:

    header.php The code that handles the header styles
    footer.php The code that handles the footer styles
    body.php The code that handles the main body styles
    post.php The code that handles every single post included in the digests

    From body.php you need to move this part of code:

    <p style="font-size: 17px;margin-bottom: 10px; font-weight: normal; font-size: 14px; line-height: 1.6;">
    											<?php echo sbe_get_header_text(); ?>
    										</p>

    to file header.php and paste it after line 12, like that

    Let me know if you have more questions

    kind regards,
    Kasia

  • Rupok
    • Support Ninja

    Hi Gwindylyn,

    For putting that text above the logo, please replace all code inside the "header.php" file inside your "/wp-content/themes/YOURTHEME/subscribe-by-email/" directory with the following code:

    <div style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif !important;">
    	<table style="width: 100%;" class="header-bg-color" bgcolor="<?php echo sbe_get_header_color(); ?>">
    		<tbody>
    			<tr>
    				<td></td>
    				<td style="display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important;">
    					<div style="padding: 15px; max-width: 600px; margin: 0 auto; display: block;">
    						<table style="width: 100%;" class="header-bg-color" bgcolor="<?php echo sbe_get_header_color(); ?>">
    							<tbody>
    								<tr>
    									<td>
    										<p style="font-size: 17px;margin-bottom: 10px; font-weight: normal; font-size: 14px; line-height: 1.6;">
    											<?php echo sbe_get_header_text(); ?>
    										</p>
    										<a href="<?php echo get_home_url(); ?>"><img class="logo-width" style="max-width:<?php echo sbe_get_logo_width(); ?>px;" src="<?php echo sbe_get_logo(); ?>"></a>
    									</td>
    									<td align="right">
    										<?php if ( sbe_display_blog_name() ): ?>
    											<h6><a style="text-decoration:none !important; margin: 0 !important; padding:0;font-weight: 900; font-size: 14px; text-transform: uppercase; color: <?php echo sbe_get_header_text_color(); ?>;" class="header-text-color" href="<?php echo get_home_url(); ?>"><?php echo sbe_get_from_sender(); ?></a></h6>
    										<?php endif; ?>
    									</td>
    								</tr>
    							</tbody>
    						</table>
    					</div>
    				</td>
    				<td></td>
    			</tr>
    		</tbody>
    	</table>

    I believe, this will serve your purpose.

    Please let us know if this doesn't work as expected or if you have any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Nithin
    • Support Wizard

    Hey Gwindylyn,

    Hope you are doing good today. :slight_smile:

    You meant to move the mentioned blurb below the logo? If yes, I have edited your header.php file to the following:

    <div style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif !important;">
    	<table style="width: 100%;" class="header-bg-color" bgcolor="<?php echo sbe_get_header_color(); ?>">
    		<tbody>
    			<tr>
    				<td></td>
    				<td style="display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important;">
    					<div style="padding: 15px; max-width: 600px; margin: 0 auto; display: block;">
    						<table style="width: 100%;" class="header-bg-color" bgcolor="<?php echo sbe_get_header_color(); ?>">
    							<tbody>
    								<tr>
    									<td>
    
    										<a href="<?php echo get_home_url(); ?>"><img class="logo-width" style="max-width:<?php echo sbe_get_logo_width(); ?>px;" src="<?php echo sbe_get_logo(); ?>"></a>
    
    <p style="font-size: 17px;margin-bottom: 10px; font-weight: normal; font-size: 14px; line-height: 1.6;">
    											<?php echo sbe_get_header_text(); ?>
    										</p>
    									</td>
    									<td align="right">
    										<?php if ( sbe_display_blog_name() ): ?>
    											<h6><a style="text-decoration:none !important; margin: 0 !important; padding:0;font-weight: 900; font-size: 14px; text-transform: uppercase; color: <?php echo sbe_get_header_text_color(); ?>;" class="header-text-color" href="<?php echo get_home_url(); ?>"><?php echo sbe_get_from_sender(); ?></a></h6>
    										<?php endif; ?>
    									</td>
    								</tr>
    							</tbody>
    						</table>
    					</div>
    				</td>
    				<td></td>
    			</tr>
    		</tbody>
    	</table>

    And now it seems to work fine. Please test, and let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Best Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.