V
V
Vladimir Kulikov2020-05-14 18:16:09
WordPress
Vladimir Kulikov, 2020-05-14 18:16:09

Is it possible in wordpress to set id of pages, posts with letters and symbols?

Is it possible to set id pages, posts in wordpress with letters and symbols and not just numbers?

I'm interested for one purpose, you need to export goods from iiko, and there the goods have an id of symbols and numbers. I'm wondering if it's possible to set symbols in wordpress id.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
WP Panda, 2020-05-14
@it_proger29

just store iiko id in a separate meta field Like
this3a8d257cc4.jpg

D
Dima Polos, 2020-05-14
@dimovich85

id - no, there it is taken from the database, autoincrement. Pages, posts, etc. have a label, or slug, you can think of something with it. This slug is used in CNC.

O
Orkhan Hasanli, 2020-05-15
@azerphoenix

for goods id from symbols and numbers

this is the so-called UUID (Unique Identifier). It guarantees the uniqueness of the generated string.
For example, in java language there is such an object as UUID. And when developing in java, it is a fairly common practice to use UUID as an id
. In PHP, there is such a thing - https://www.php.net/manual/ru/function.uniqid.php.
I agree that you need to store this id in a separate meta field. This will make it possible to update the product in the future by finding it in the database by UUID

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question