Saltar navegación

[Resuelto] Publishing post ID in a custom field

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Zona horaria del colaborador: America/Jamaica (GMT-05:00)

Este tema contiene 5 respuestas, tiene 3 mensajes.

Última actualización por williamA-6 3 years, 10 months ago.

Asistido por: Shane.

Autor
Mensajes
#2440087

I need to add/publish a unique reference number to every CPT and would like to use the post ID.
Can you please talk me through how to do this using a custom field?
Many thanks in advance

#2440311

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi there

Sorry, could you clarify what you are aiming for?

You have a unique reference number (from somewhere) and you'd like to store that value in a custom field?

Or you'd like to use the unique post ID as the reference number and store it in a custom field? (Although, why would you do that, if you already have a unique post ID?)

Or something else?

And what is the context for where/when this happens?

#2440337

This is for a real estate site that will be importing properties from various sources and there is a high propbablity of duplicate reference numbers. So to avoid potential duplicates, I would like to use the post ID as the reference number that is published for each property.

#2440435

Shane
Colaborador

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi William,

As I understand will there already be a reference number attach to the property?

Also what are you using to import the posts. Secondly is that reference number already stored in a custom field.

Please let me know.
Thanks,
Shane

#2440681

Please, I would just like to know how I can display the post ID in my CPT so it can be used as a reference number.

#2440693

My issue is resolved. [return_post_id]