Insert Custom Fields of type integer with the REST API

  • Unknown's avatar

    Hi team,

    I have a custom field registered. I want to use the REST API to update and insert post with the right custom field value instead of doing it manually through the dashboard.

    I can successfully insert and update post with the REST API. However, the custom field only appears when it is of type string. If I register the field for a different type (integer, number, boolean) it doesn’t appear in the post nor does it in the HTTP response.

    I’ve also noticed that inserting a custom field manually doesn’t let me specify the type either.

    Are custom fields restricted to strings only on WordPress.com sites?

    The blog I need help with is: (visible only to logged in users)

  • Hi there!

    Thank you for your message.

    Can you please tell us a bit more about how exactly did you create that custom field?
    Did you use some custom coding or a 3rd party plugin?

  • The topic ‘Insert Custom Fields of type integer with the REST API’ is closed to new replies.