Several times i have been asked : Does MailPress support Custom Post Types ?
The answer is “may be Yes, may be No” … hard to forget my norman childhood …
may be Yes :
WordPress genuinely supports a custom post type which is ‘post’. So does MailPress.
How to extend my ‘post’ newsletter and add a custom post type (e.g. ‘my_post_type’) :
- Modify the newsletters xml definition files (
mailpress\mp-content\advanced\newsletters\daily.xml,monthly.xml&weekly.xml) adding in the processor section :<processor> <query_posts> <post_type>post</post_type> <post_type>my_post_type</post_type> </query_posts> </processor>
- Be carefull when upgrading MailPress, not to delete your specific settings in the xml files.
may be No :
That will work for daily, weekly and monthly newsletters.
For new_post newsletters, MailPress tries to send a newsletter whenever the hook ‘publish_post’ is fired (mailpress/mp-includes/class/MP_newsletter_scheduler_post_.class.php line #7 [MailPress 5.2]).
So the hook ‘publish_my_post_type‘ is not currently supported.
Will MailPress support the hook ‘publish_my_post_type‘ in the future ?
This is a lot of work. I personnally think that complete Custom Post Type integration requires to :
- Create new directories to host Custom Post Types newsletters definitions :
mailpress !_ mp-content !_ advanced !_ newsletters !_ custom_post_types !_ taxonomiescustom_post_typefolder would contain the equivalent ofdaily.xml,monthly.xml,new_post.xml&weekly.xmlfiles.
taxonomieswould contain the equivalent ofcategories.xmlfile(s). - Customize some code – that is today related to the post type ‘post’ (hook ‘publish_post’) and taxonomy ‘category’ – to make it “Custom Post Types” compatible :
mailpress\mp-includes\class\MP_newsletter_scheduler_post_.class.phpmailpress\mp-includes\class\options\newsletter\schedulers\post.phpmailpress\mp-includes\class\options\newsletter\schedulers\post_cat.phpmailpress\mp-includes\class\options\newsletter\processors\now.php
And have to consider that taxonomies can be optionally hierarchical …
- Develop a new add-on :
- new settings tab asking which custom post types should be supported and if they have related taxonomies, with which taxonomies … not that simple.
- Custom Post Types newsletter registration
- … and surely many other things …
More on Custom Post Types.

Loading...

(MailPress 5.3) With some code changes, custom post type integration will be simpler but will still require some code (processor and scheduler) and xml files.
Custom post type + custom taxonomies can be possible using http://codex.wordpress.org/Taxonomies#Querying_by_taxonomy