Skip Navigation

[Resolved] Number will increment when editing post “Auto Numbering Posts”

This thread is resolved. Here is a description of the problem and solution.

Problem:
I would like to automatically increment a custom field value when I create a new post in my custom post type. The field value should be the highest field value from the other posts, plus one.

Solution:
You can use standard wordpress hook "save_post" to build such solution and add that hook to your current theme's functions.php file.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/number-will-increment-when-editing-post-auto-numbering-posts-vs2/#post-644615

Relevant Documentation:

This support ticket is created 6 years, 8 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 18 replies, has 3 voices.

Last updated by JosV9233 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#632480

after log in on v-web.zz6.nl go in the menu to admin > zoeken. On this page (view) you see in the results part ordernummer. This is one place where it is shown. When you click an ordernummer you c ome to a content template where the order number is also shown.

#632483

Log in, then in the menu admin > zoeken. You come to a view. In the results part you see the ordernummer. (view: Zoek op einddatum abonnement). When you click the ordernummer you come to a content template (Template for telorder). There it is also used.

#632519

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I can see its working: hidden link

I clicked on "Jozef van Maria" record number 4 and it redirected me here: hidden link

I can see its displaying the number.

#633179
toolset 99.jpg

Minesh,

It is supposed to increment the ordernummer when you make a new order. And now it does not, there is no ordernummer.

The problem: I had it working that it would give an order number to a new order. Every new order would get an ordernummer one higher then the last one. That was what I wanted. What I did not want was that when I edited an order it would also raise the ordernummer.

Now I do not get an ordernummer with new orders anymore. The system is not at all working anymore. Go to the view (see screenshot) and see that there is no new order numbers.

#638744

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

Hi there

Minesh is sick, but will hopefully be back in tomorrow. As he is already looking at this issue I'll leave it for him to reply further.

#641755

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - the shared FTP access details again not working at this end.

Could you please send me working FTP access details.

I have set the next reply to private which means only you and I have access to it.

#644032

Can I put the ftp login somewhere? This doesn't look like a private post.

#644040

No more help from you needed Minesh, I will turn to another supporter.