WordPress-API-iOS icon indicating copy to clipboard operation
WordPress-API-iOS copied to clipboard

Problem with creating custom post type.

Open fajksk opened this issue 12 years ago • 0 comments

I was trying to create post with additional fields (fields were already defined on wordpress), but those fields wasn't saved on wordpress site. Code which I was trying to execute is NSMutableArray *array = [NSMutableArray array]; [array addObject:@{@"firstname":@"Krzysztof"}]; [array addObject:@{@"lastname":@"Fajks"}]; data[@"custom_fields"] = array; data[@"post_type"] = @"rfuser"; data[@"post_status"] = @"publish"; [self.wpApi publishPostWithDict:data success:nil failure:^(NSError *error) { NSLog(@"Error %@", error); }];

I'm not sure, what is wrong because request generated from this library seems to be correct.

fajksk avatar Jan 02 '14 09:01 fajksk