WordPress-API-iOS
WordPress-API-iOS copied to clipboard
Problem with creating custom post type.
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.