Skip Navigation

[Resolved] Publishing post ID in a custom field

This support ticket is created 2 years, 11 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 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 3 voices.

Last updated by williamA-6 2 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#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
Supporter

Languages: English (English ) Spanish (Español )

Timezone: 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
Supporter

Languages: English (English )

Timezone: 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]