Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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?

share|improve this question

1 Answer 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?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.