What is the exact code for that and how do i need to input that in the Loop Template?
Also at the moment when I go to the "My-account" page ( as a visitor - not logged-in ), right no I see the the "No Items Found" text displayed. So when i put in the code i need (1st question), I guess non logged-in visitors can see that as well. How do I prevent that??
Hello. Thank you for contacting the Toolset support.
Do you mean that you want to display the form when user is not-logged in?
If you can share more details with problem URL and access details I would be happy to help.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
When the user is not logged-in it shouldn't display any form.
Just the login page, see: image 1
When a user is logged in, he sees his own profile, see: image 2
But when a user is new and has done these steps:
1. At the homepage clicked on the button "Registreren ondernemers",
2. Selected a product (1 year subscription - monthly payment),
3. Directed to checkout page,
4. Filled in payment details,
5. Paid for the subscription,
6. Received the confirmation mail with log-in details,
7. Logged-in to his "My Account" page.
He hasn't created a Profile post yet and needs to see the link, for the form to create a new profile (Post Form - Profiel aanmaken formulier ID: 4449).
This Form should only be visible to new users who haven't yet created a profile.
Once created this link needs to be replaced bij the one shown in image 2 (Since each user is only allowed to create one post).
I think we have a misunderstanding.
There is no form for non logged-in users (nothing except hidden link), since he can't access the my account page. (no Member yet. For that he needs to go to the "registreren ondernemers" page).
What we do want for everyone to see who isn't logged-in that clicks on the "Mijn Account" (My account) button is the Log-in page(set-up by WC Subscriptions).
But let's get back to the original question, when a user (new or excisting) IS logged in:
- How do i only show NEW users the "Create new post" (ID: 4449) link or form (like mentioned before, new users are only allowed to create 1 new post)?
and
- How do i only show the RETURNING user (who already created a post) the view loop that i created for logged-in users see previous "image 2" (this is the actual profile form with an "Edit"link in the left top corner)??
Ok - Can you please tell me what content template you created for "My Account" page?
- How do i only show NEW users the "Create new post" (ID: 4449) link or form (like mentioned before, new users are only allowed to create 1 new post)?
==>
When uesr is logged-in, he/she will be redirected to "My Account" page and on my account page, we will display the view that lists the posts created by current loggedin user.
In the WooCommerce Subscription “My Account” page, I’ve added 2 containers with the following:
1st Container:
- Added a view
- Content selection -> query filter -> author same as current logged-in user
- View Loop
- Conditional -> NOT (current user role is equal to role subscriber)
- Inside I added the content template with user profile
2nd container:
- Added a view
- Content selection -> query filter -> author same as current logged-in user
- View loop
- Loop template -> [cred_form form="create-new-post-form"]