I have created a site where people can subscribe and then acces their account page. (Using ultimate member) Very straight forward so far, now there is a page on the website where I have created a form qith contact form 7 for the users that are signed in to further sign in to “tournaments” or “clubs”.
Nmy question is, what would I need to do to display in their account page a something like “club 1” “registered”
“Club 2” “not registered”
Depending on if they have registeres to that contact form 7. If there is a way I will really appreciate it
I tried some code with chat gpt adding funtion.php code but it doesn’t seem to work. I ‘m not an expert working with code.
2
Answers
You can rely on user’s role for its conditional. And since you are using a membership plugin, there should (always) that kind of function like conditional that can also works on every page.
I am not sure how do you keep track if a user is subscribed or not. I’d assume you have a database, if not, you should make one. Make a table in the database for all the users and add columns based on what you need. Like username, email, first name, last name, subscription, tournament specific columns etc. That way, you can save data for each user on whether they are subscribed to it or not. Accessing the database via php is very easy. You can check out php:sqlite3 manual.
Once you have a database, you can run queries to add/update or delete columns/rows and their values. Check out this query manual.