joei
joei

Reputation: 343

How to fill a ACF repeater field by WordPressSharp in C#?

I can send data and fill simple custom fields. But it does not work with ACF repeater fields. It does not get value at all.

   using (var client = new WordPressClient(new WordPressSiteConfig
            {
                BaseUrl = "http://example.com",
                Username = "username",
                Password = "pass",
                BlogId = 1
            }))
            {

                var customFields = new[]
                {
                    new CustomField
                    {
                        Key = "field_586c1a9332541",
                        Value = "google.com";
                    }
                };

                var post = new Post
                {
                    PostType = "video", 
                    Title = "title",
                    Content = "description",
                    PublishDateTime = DateTime.Now,
                    Status = "draft", 
                    CustomFields = customFields
                };

                var id = client.NewPost(post);
            }

Is it possible to work with repeater fields by WordPressSharp ?!

Upvotes: 1

Views: 139

Answers (0)

Related Questions