database code necessary for adding new news

Posted in: Newspaper
Post count: 13

hello for me very valuable tagdiv team,
First of all I would like to thank you for making such a beautiful work.

I do not like to use the WordPress admin panel.
That’s why I want to use C # to add a new article directly from the database

I do not know the full details required to install a news database code I need a list of themes.

for example ;


using (var client = new WordPressClient())
{
var post = new Post
{
PostType = "property",
Title = "deneme",
Content = "<p> test emlak </p>",
PublishDateTime = DateTime.Now,
Status = "publish"
};
var customFields = new[]
{
new CustomField
{
Key= "REAL_HOMES_property_price", Value = textBox2.Text
},
new CustomField
{
Key = "REAL_HOMES_property_price_postfix", Value = textBox3.Text
}
};

post.CustomFields = customFields;

var featureImage = Data.CreateFromFilePath(url,mime);
post.FeaturedImageId = client.UploadFile(featureImage).Id;

var id = Convert.ToInt32(client.NewPost(post));

}

I have shown in the example ;

I want Custom Field and Post type as setting words List

Post count: 13

I just finished the first submissions is one of my own projects,
Examples of the aforementioned “realhomes theme” has nothing to do with tagdiv.

king regard

Post count: 22421

Hi,

Thank you for your kind words and appreciation.
Unfortunately we are unable to help in this matter as we have not tested any other implementation of posts besides the default wp one. This customization is done in the db regardless of the theme used and we did not try c# in adding posts in the database so I cannot provide a precise answer in this regard. Maybe you can find a few online resourcess on how to bypass WP if you chose so.

Sorry for not having a better answer.
Thank you for your message!

Post count: 13

Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.