Is it possible to change first_publication_date?

I am planning to move my uncles old WordPress website to Prismic.

I would like to preserve the old publishing date in the nes Prismic posts. Looks like, I can use first_publication_date field for it, but I am unsure if it is possible to manually adjust this field.

Can anyone help?

1 Like

Hi @pawelgrzybek,

Thanks for reaching out.

In fact, it is not possible to set first_publication_date using the Import/Export feature, and In fact, I will create a feature request and send it to our @features-team to allow that as it makes total sense.

A workaround would be to add a new field to your custom type, such as publication_date and run a script to change it automatically in your WordPress export.

And then, you can have a fallback in your application to check if this field is set. You take its value. Otherwise, you accept the first_publication_date to handle newly-created posts.

Please let us know if need any further help,
Fares

Yes, that makes sense. I wanted to avoid creating new field, but looks like thats what I am going to end up doing. Thanks a ton @Fares

1 Like

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.

@Fares (or someone else from Prismic). This is a pretty big problem. There is no Write API for posts and also no way to edit the First Published Date. What's the status of this feature request?

A custom field as a second parameter in sorting API requests doesn't seem to be working either.

Hello @bassplayer7, we have no updates for the moment. Check out our progress page to see all the features we're currently working on. What's new - Prismic
Thanks

Any updates on this? Seems like a relatively easy feature to add that will solve a lot of problems for a lot of people (including myself).

Hi @barrymichaeldoyle,

Nope, no update on this, but we'll be sure to mention it when we're discussing feature requests with the product team.

Sam

1 Like