I am working on a membership site with wordpress, buddypress, members, acf pro, woocommerce, a custom post type and the X theme.

All users will have a buddypress profile. However, an artist role will have access to post to the custom post type. I already have a custom post type setup. Currently, when a user signs up through buddypress registration form and they click the “I am an artist” radio button, they are automatically assigned the wp role named “artist”.

What I still need upon registration, to generate a sequential membership number for users with the artist role that will be displayed on the front-end. This number needs to last forever and not be affected if a user or profile is deleted. In other words, if a user is removed we don’t want everyone else’s number to change.

WordPress user ID will not work for several reasons. Primarily, because it is associated with all users and the signups will affect the sequential order of the artist numbers. It is important that artist numbers start at 000001 and increment up from there.

I am not a developer/coder. But I am not a total noob either, though I may need a little hand-holding to get through this. I have done an immense amount of searching for an answer to this situation but it seems that I must reach out for help. If you know how to do this I humbly request your assistance.

I am open to this number being assigned by php or by the database. I am also open to it being separate from buddypress, though if it is with buddypress, I still only want the artist role to utilize the membership number.

Below are some of other posts I have found that other people have attempted to do something similar. The fact that I need this to be role-based makes this even more complex.

I really need help and I want to learn. Thank you for your time.

How to generate sequential numbering in wordpress

https://slickmedia.co.uk/blog/glenns-blog/sequentially-number-wordpress-posts/

Read more here: Assign 6 digit sequential member number to role upon registration (not $user_id) – WordPress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: