possible extension of addon newsletter categories to support custom post types?

70 views
Skip to first unread message

ovivankenobi

unread,
Oct 8, 2010, 9:55:50 AM10/8/10
to MailPress
talking about this addon: http://www.mailpress.org/wiki/index.php?title=Add_ons:Newsletter_categories
it would be great if someone could extend it to support custom post
types too...

i.e. I have a custom psot type called recipe where I publish recipes
and it would be nice to allow subscriptions to that custom psot type,
i.e. not subscribe to anything on my site except this custom post
type...

possible? anyone?

andré renaut

unread,
Oct 8, 2010, 10:28:00 AM10/8/10
to mail...@googlegroups.com
i suppose these custom post type have a specific taxonomy and post/category taxonomy cannot be reused.
Is there a specifc hook like 'publish_post' for a custom post type ?

ps : can you give the code declaring this specific post type

thanks

2010/10/8 ovivankenobi <ovivan...@gmail.com>
--
=== Please Donate ! https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=andre%2erenaut%40gmail%2ecom&lc=US&item_name=MailPress&item_number=gg&amount=5%2e00&currency_code=EUR&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest ===

You received this message because you are subscribed to the Google
Groups "MailPress" group.
To post to this group, send email to mail...@googlegroups.com
To unsubscribe from this group, send email to
mailpress+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mailpress?hl=en



--
Pensez à l'environnement avant d'imprimer ce message.
Please, think about the environment before printing this message.

ovivankenobi

unread,
Oct 9, 2010, 8:14:06 AM10/9/10
to MailPress
I'll try and answer this as good as I can. I admit I am using plugins
to create custom post types and custom taxonomies but if I had to do t
by hand this would be the way:

general info: http://codex.wordpress.org/Custom_Post_Types and
http://codex.wordpress.org/Custom_Taxonomies
how to register a post type: http://codex.wordpress.org/Function_Reference/register_post_type
how to register a custom taxonomy: http://codex.wordpress.org/Function_Reference/register_taxonomy

I hope that helps as I was not 100% what more you need. the pages
explaining how to register a custom post type/taxonomy are pretty
straight forward.

andré renaut

unread,
Oct 9, 2010, 8:20:45 AM10/9/10
to mail...@googlegroups.com
which plugins ?

do you have a custom taxonomy for this custom post type (recipes) ?

2010/10/9 ovivankenobi <ovivan...@gmail.com>

--
=== Please Donate ! https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=andre%2erenaut%40gmail%2ecom&lc=US&item_name=MailPress&item_number=gg&amount=5%2e00&currency_code=EUR&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest ===

You received this message because you are subscribed to the Google
Groups "MailPress" group.
To post to this group, send email to mail...@googlegroups.com
To unsubscribe from this group, send email to
mailpress+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mailpress?hl=en

ovivankenobi

unread,
Oct 10, 2010, 5:41:43 AM10/10/10
to MailPress
I thought you wanted general info not specific to my situation but
here you go:

using this plugin: http://wordpress.org/extend/plugins/gd-taxonomies-tools/
but tried a couple of others. Doesn't really matter as they all do the
same: use the register custom psot type and register custom taxonomy
code given above so I don't have to manually do it via functions.php

custom post type: recipes
custom taxonomies:

Domain Label Name Rewrite Query
Hierarchical Terms
recipe Ingredients ingredient yes ingredient no 14
recipe Cuisines cuisine yes cuisine yes 3
recipe Courses course yes course no 2
recipe Special diets special_diet yes special_diet no 1

andré renaut

unread,
Oct 10, 2010, 1:43:17 PM10/10/10
to mail...@googlegroups.com
thank you still thinking how to do that

expecting answers from dev4press and french wp community about hooks when a CPT is published !

2010/10/10 ovivankenobi <ovivan...@gmail.com>

--
=== Please Donate ! https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=andre%2erenaut%40gmail%2ecom&lc=US&item_name=MailPress&item_number=gg&amount=5%2e00&currency_code=EUR&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest ===

You received this message because you are subscribed to the Google
Groups "MailPress" group.
To post to this group, send email to mail...@googlegroups.com
To unsubscribe from this group, send email to
mailpress+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mailpress?hl=en

ovivankenobi

unread,
Oct 11, 2010, 9:23:39 AM10/11/10
to MailPress
great. thx. no rush, just wanted to point out this enhancement.

jozeck

unread,
Oct 14, 2010, 4:00:50 AM10/14/10
to MailPress
On 11 Paź, 15:23, ovivankenobi <ovivanken...@gmail.com> wrote:
> great. thx. no rush, just wanted to point out this enhancement.

I need such enhancement, but I need it now. I can do it on my own, but
I will be gratful for some help.

I created custom addon using code from newsletter_categories. My
taxonomy shows on category list in MailPress settings.
I had to do some changes in register method of the plugin, in
particular in retrieving terms list, but also I had to use an 'init'
hook to register new newsletters. It is because custom taxonomies are
registered in WP after calling register() method of the add on.

What I need now is to include getting custom post types while getting
list of posts.

Someone can help me with that? I will do some research myself, too.

andré renaut

unread,
Oct 14, 2010, 7:17:07 AM10/14/10
to mail...@googlegroups.com
can you share your code somewhere (zip files)
thank you

2010/10/14 jozeck <joz...@gmail.com>
--
=== Please Donate ! https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=andre%2erenaut%40gmail%2ecom&lc=US&item_name=MailPress&item_number=gg&amount=5%2e00&currency_code=EUR&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest ===

You received this message because you are subscribed to the Google
Groups "MailPress" group.
To post to this group, send email to mail...@googlegroups.com
To unsubscribe from this group, send email to
mailpress+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mailpress?hl=en

ovidiu

unread,
Nov 15, 2010, 4:42:57 AM11/15/10
to MailPress
anything happening on this end? did the dude share his code?
Reply all
Reply to author
Forward
0 new messages