Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mohammad983 opened this issue Jun 12, 2018 · 0 comments
Open

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

mohammad983 opened this issue Jun 12, 2018 · 0 comments

Comments

@mohammad983
Copy link

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 ?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant