0

I am using JoeBlogs https://github.com/alexjamesbrown/JoeBlogs to publish my content from ASP.NET VB to wordpress. I am having some problems with posting my Post in Private Status instead of Public Status

Here is my code for creating a new Post Status:

Dim postStatus = New PostStatus()

And this (i tried both of it but none of it work for me)

postStatus = JoeBlogs.PostStatus.Private
postStatus = postStatus.Private

The result is just publish my Post Content with Public Status without any error, i tried to debugged it and cant find any problem.

Any help would be greatly appreciated. even in C# would help me alot! ps. its my first time posting on stackoverflow sorry for any mistakes

Edit #2 This is my other field which is working fine.

 Dim post = New Post() 


post.DateCreated = DateTime.Now
post.Title = txtTitle.Text
post.Body = txtContent.Text

wp.NewPost(post, True)

wp.NewPost does not support postStatus.

LeoN
  • 1
  • 2
  • How are you trying `postStatus` to something else? At the moment it sounds like you're just creating it in memory, but not actually doing anything with it. – ProgrammingLlama Jan 20 '22 at 03:00
  • this is just part of my code, my full code can post content and upload attachment to wordpress, all i need is just to post it in "Private Status" – LeoN Jan 20 '22 at 03:08
  • Yeah, but if you just declare a variable called `postStatus`, how does the library know that the variable even exists, let alone that it needs to apply it to anything? – ProgrammingLlama Jan 20 '22 at 03:14
  • Is [this](https://github.com/alexjamesbrown/JoeBlogs/blob/5231529d67aa3e9bd87feca9df7fd6bb88203d4e/JoeBlogs/wrappers/MetaWeblogWrapper.cs#L37) the class you're using? It seems like you want `false`, not `true`. Or is private != draft? – ProgrammingLlama Jan 20 '22 at 04:23
  • yes private is not draft, thats not what i want, but thx for the help – LeoN Jan 20 '22 at 05:08
  • I wonder if you might be better off finding a maintained library. The last update to the one you're using was in 2014 and the author last responded in 2018. – ProgrammingLlama Jan 20 '22 at 05:19
  • I Cant find any relevant library that can upload media and post content to wordpress from asp, thats why im using joeblogs which got few examples that i can follow up and modified . – LeoN Jan 20 '22 at 05:51

0 Answers0