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?

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,

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.