Display a List of Past Newsletters (Archive) on a Page

In order to display a list of sent newsletters on your website, you must create a new page by going to the Pages menu of your WordPress website and then click on “Add New”. Once inside the page editor, just add the shortcode below to display a list of past newsletters:

[mailpoet_archive]

All previously sent newsletters will be listed, except for:

  • Autoresponder (automatic newsletter sent after an event, like a new subscription)
  • Draft newsletters
  • Scheduled newsletters
  • Newsletters individually hidden from the archive (see Hide Individual Newsletters from the Archive below)
Tip: The [mailpoet_archive] shortcode displays a list of links to all your past newsletters. If you want to embed a single specific newsletter directly into a page, use the [mailpoet_newsletter] shortcode or the MailPoet Newsletter block instead. Learn how to embed a sent newsletter on your website.

Filter the list of newsletters

By default, [mailpoet_archive] will show the latest 100 sent newsletters. There are a couple of options to limit which emails are listed. Just head to MailPoet > Settings > Basics to modify the filter as you wish:

There are six options available:

  1. List(s) the newsletters were sent to.
  2. Newsletters sent in the last X days.
  3. Specific time range when the newsletters were sent.
    1. You can choose only the start or end date or both.
  4. Only newsletters whose subject contains a keyword.
  5. Limit the number of emails shown. If there are more, they won’t be shown.

Hide Individual Newsletters from the Archive

In addition to the global filters above, you can control archive visibility on a per-newsletter basis. This is useful when you want to keep the archive active on your site but exclude specific newsletters, such as one-time announcements or time-sensitive promotions.

By default, all sent standard newsletters appear in the archive. You can change this setting before sending or scheduling a newsletter.

In the Classic Newsletter Editor

  1. Go to MailPoet > Emails and create or edit a standard newsletter.
  2. Proceed to the final send and settings step.
  3. Under the Archive section, find the Show this newsletter in the archive toggle.
  4. Turn the toggle off to hide the newsletter from the archive.
  5. Send or schedule the newsletter as usual.

In the New Email Editor

  1. Go to MailPoet > Emails and create or edit a standard newsletter using the new email editor.
  2. Open the Review and Send panel.
  3. Find the Show this newsletter in the archive toggle.
  4. Turn the toggle off to hide the newsletter from the archive.
  5. Send or schedule the newsletter as usual.
Note: This setting applies only to standard newsletters. Post notification emails are not affected and will continue to appear in the archive regardless of this setting.
Tip: When you duplicate a newsletter that was hidden from the archive, the duplicate defaults back to visible. Turn off the toggle again before sending the duplicate if you want it hidden as well.

This per-newsletter setting works together with the global archive filters described above. A newsletter must pass both the global filters (list, date range, keyword, and limit) and not be individually excluded in order to appear on the archive page.


Display it in your sidebar

If you want to display it in your theme’s sidebar, you should install this plugin:  ShortCode Widget

You should follow the same steps used to  Display Total Number is Subscribers in your sidebar, just make sure to insert the archive shortcode.


Filters for modifying the look of the list

If you want to modify the date or the subject of the newsletters displayed with the shortcode, you can use the filters below. Just add the code snippet to the bottom of your theme’s function.php file:

/**  
 * Filter "mailpoet_archive_title": display custom title  
 * @param string $title  
 * @return string  
 */ 
function my_mailpoet_archive_title($title) {     
    return $title. 'Awesome newsletters'; 
} 
add_filter('mailpoet_archive_title','my_mailpoet_archive_title');  

/**  
 * Filter "mailpoet_archive_email_processed_date": add custom text  
 * @param string $sent_at  
 * @return string  
 */ 
 function my_mailpoet_archive_date($sent_at) {     
     return '( 	
       <strong>Great!</strong>) '.$sent_at; 
} 
add_filter('mailpoet_archive_email_processed_date','my_mailpoet_archive_date',99);  	

/**  
 * Filter "mailpoet_archive_email_subject_line": add custom text  
 * @param type $subject  
 * @return type  */ 
 function my_mailpoet_archive_subject($subject) {     
    return $subject. ' <== CLICK HERE'; 
} 
add_filter('mailpoet_archive_email_subject_line','my_mailpoet_archive_subject',99);

Note: DO NOT modify any of your theme files if you don’t know what you are doing. MailPoet does not provide support for code customization; therefore, whatever custom shortcode you create, you are responsible for troubleshooting any issues and supporting it!

Related Articles