Setting post expiration via REST API
-
Hello,
I’m wondering if it’s possible to set (and possibly modify) the expiration date on a POST if the post is created programmatically via the REST API. I assume this would be done via populating the “meta” key.
This may mean that the plugin may need to implement register_rest_field, which it doesn’t seem to do, but I’m not sure.
I’m new to wordpress, so please let me know if there’s an obvious solution I’m missing!
Looking at the documentation for “Custom fields“, it says “With some extra coding, it is possible to achieve more complex actions, such as using the metadata to store an expiration date for a post.”, but I’m not sure if this is the solution here.
The topic ‘Setting post expiration via REST API’ is closed to new replies.