abrudtkuhl / WordPressSharp

A C# client to to interact with the WordPress XML-RPC API
abrudtkuhl.github.io/WordPressSharp/
GNU General Public License v3.0
103 stars 49 forks source link

Adding Category to Post exception #101

Closed romidi closed 5 years ago

romidi commented 5 years ago

I can get the category without any problem Term t = client.GetTerm("category", 1);

But when i want to add a category to post I get this error

Server returned a fault exception: [401] Sorry, one of the given taxonomies is not supported by the post type.

Doesn't matter even if i add new category.

var terms = new List(); terms.Add(t); var post = new Post { PostType = "post", Title = title, Content = Description, PublishDateTime = DateTime.Now.AddHours(-1), Status = "publish", Terms = terms.ToArray() }; client.NewPost(post);

romidi commented 5 years ago

Issue is solved, I was using old version 1.0.0 not 1.1.0