codebykat / wp-post-by-email

Post By Email plugin for WordPress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Choosing a default post type

richbrat opened this issue · comments

I've written a few lines of code making it possible to choose a default post type in the same way you can choose default category. Adding this would create a small confilct with the default category though – if the default category's taxonomy is not added to the post type you've set as a default then of course the post will not have that category. Question is, do you still want me to commit this code or do you think it's a bit too sloppy?

I guess the correct way of doing this (IMO) would be to overdo it a bit maybe: after you've chosen a default post type all connected taxonomies will display as AJAX loaded separate select boxes with their respective terms in them. I haven't really looked into the whole shortcodes thing in this plugin but I guess that would have to change as well, giving users the possibility to choose taxonomy and terms as well.
I might be able to spend some time dealing with this if you think it's a good idea?

Hi @richbrat! Revisiting this poor neglected plugin.

I like the idea of having a default post format in the settings. I think it makes less sense to support setting a default for every connected taxonomy. We could check via AJAX and disable the default category if the post type in question doesn't have categories -- that would solve the conflict without making things too confusing.

Yeah, maybe that's better. Don't know if it makes more sense though in a bigger perspective but since WP comes with a default hierarchical taxonomy (Categories), and everyone is used to that, it probably isn't making things too confusing just disabling the default category if it's not connected to the chosen post type.
My turn to carve out some time to fix this ...

@richbrat Heads up! I just refactored a bunch of stuff, you'll want to merge w/upstream.

Thanks! I'm following this repo like a hawk now, so no probs. Great work!