janboddez / import-from-mastodon

Automatically turn toots—short messages on Mastodon—into WordPress posts.
GNU General Public License v3.0
13 stars 2 forks source link

Categories #13

Closed markwaters closed 2 years ago

markwaters commented 2 years ago

I'd love to be able to set a Category for the incoming Toots as they currently all just get added to the default Uncategorized category. It would be easy to find all my Toots then.

janboddez commented 2 years ago

Same remarks as here: https://github.com/janboddez/import-from-pixelfed/pull/6.

It's technically possible to set a post category, and I'm looking into adding it as a proper setting, but it may be incompatible with custom post types (for which taxonomies, like category, are not automatically set). In fact, CPTs might have completely different taxonomies.

I will probably simply remove the CPT setting (users "advanced" enough to be using CPTs will have to use a filter callback, then), and assume "normal" posts. And add a dropdown through which a single category can be set, which will then be applied for all imports.

The filter hook + a custom functions.php snippet can of course still be used to override the default behavior (to set more than one default category, for instance).

janboddez commented 2 years ago

Current version ("0.3.0," but I don't really do proper releases, at least not yet) contains the ability to select a post category. Also means I've for now removed the post type option.

(A custom post type can still be set [and the default category unset], should one wish to do so, using the import_from_mastodon_args hook.)

markwaters commented 2 years ago

Working perfectly for me , Thank you!