Regading making the mail-template.php show the entire 1st sentence only and removing the by...date.

Hi folks,

Please see the annotated screenshot.

How can we, with the mail-template.php show the entire 1st sentence only and remove the entire by author on date section?

Thanks a lot!

  • Tyler Postle

    Hey Greg,

    Hope you're doing well today!

    You can remove the date and author by removing approx. line 187 of mail-template.php, as seen in my screenshot. Since we have to do this in the template file itself, you will need to re-edit this after each update - so make note of the line :slight_smile:

    As for changing the amount of characters - it just uses the WP excerpt, so you can change how many characters the update includes by adding this to your themes functions.php:

    function custom_excerpt_length( $length ) {
    	return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Change "20" to whatever you like :slight_smile: by default the excerpt is 55.

    A solution that might work better for you is to copy and paste the first sentence into the "excerpt" box for each post - that will ensure it is actually just the 1st sentence that is included.

    Hope that helps!

    Let us know if you have any further questions.

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.