Set default custom post type for XML-RPC

So now that it is possible to work with Custom Post Types over XML-RPC, has anyone figured out a way to set the post type for all items coming in via XLM-RPC to a default post type?

IFTTT has a WordPress action that lets you create a photo post via XML-RPC.

Read More

Both are coming through as default posts, and I would like to make it possible to set all posts coming in over XML-RPC to a custom-post type.

Any thoughts?

Related posts

Leave a Reply

1 comment

  1. There was a question on WASE regarding this exact thing: How to post to WP custom post type from IFTTT.com. One of the answers had a nice hack, but it would only work with a single post type and cannot be changed – all incoming XML-RPC would be changed to that particular post type 🙁

    Maybe there’s a way to determine the incoming URL from IFTTT (ie, facebook, youtube, etc) and then create an ‘if then’ statement in functions.php to select the correlating post type of your choosing for that type of IFTTT/URL? Just speculating.

    Edit

    Just had a thought: you can specify what category your post from IFTTT will be – what if you created a custom loop/styling based on the category chosen?

    if ( $cat_from_ifttt = $category ) {
        //choose custom loop/styling?
    }
    

    It’s not exactly custom_post_types, but it’s a possible workaround?