I am trying to make a membership website for training courses.
I started with your example membership site "Knowledge center" on discover-wp.com and did some tweaks.
I have several training modules. Each training module is a custom taxonomy (term of "Module Category") of the cpt "Modules".
I currently have 2 terms, Wildlife and Waste.
The Modules are for members only.
The archives I want to display also for not members.
The archive /module, that lists all modules of both Wildlife and Waste, displays, for not logged in users.
But the Term archives, /module-category/waste and /module-category/wildlife display only: "No items found" when you are not logged in.
So you want your restricted items to be visible to non-members on your post type archive is that correct?
Yes, but also on the post type taxonomy archives: hidden link and hidden link.
Is there a link that you can send me to so that I can have a look at this ?
I created a copy of the website here: hidden link
I can give you admin access if necessary.
I dont think this one will work the way you want it to because if you have restricted the posts from guest access then they won't show up.
You are using our access plugin correct?
Would you mind allowing me to have access to the website ? Also i've noticed that screenshot you sent initially is different from the page you've sent.
Could you send the exact page in the screenshots ?
I started with this example site: hidden link
When I click on Advanced Tuts I see the archive, even if I am not logged in: hidden link
When I click on an advanced tutorial on this archive page I see that I have to log in to view the full tutorial: hidden link
This is exactly what I want.
The only difference with my website is that I did not create a custom post type for each tutorial (Module) category. Instead I use the category archives (Module-category) to show a list of the tutorials in that category.
When I am not logged in and I click on All modules I see the archive of all modules, belonging to all Module categories.
Now I want to split the modules in categories to give a user the possibility to view all modules of just one category. I added In the header menu I added links to the module category archives: Waste and Wildlife (there are 2 now, in the future there will be more). hidden link and hidden link
When I am not logged in I can not see see these category archives. I see the category description text and "No items found".
Here I want to show up the module image and title with link, like in other archives.
Is this possible and how?
I hope you can help me to find a solution.
Thank you for taking a look again.
I currently have Modules (lessons) and Module Categories (Topics)
Will it be a solution if I create a new CPT for each Module Category (Topic), currently Wildlife and Waste, (and for all future topics), instead of Module Categories?
It would introduce some management issues with this but yes you can.
I assume that you mean that there will be a lot of post types in the Dashboard if I add more Topics?
Or You can keep the Modules CPT and create the module categories as custom fields, like a checkbox.
I can try that. Will it be possible then to view an "archive" that shows only the modules (lessons) of a specific category?
Are you just using these categories to sort them ?
Yes, I use categories to sort them. I want to give a user the option to view all Modules (lessons) of just one topic, instead of all Modules (lessons) of all topics.
Will it be possible then to view an "archive" that shows only the modules (lessons) of a specific category?
A. You won't be able to create an Archive for this through the traditional way but you can create a view that will list them out based on the selected custom field value.
I tried your suggestion: keep the Modules CPT and create the module categories as custom fields, like a checkbox. This was not the ideal solution for my.
But I found the solution.
I created a view "list-modules-wildlife-3" that lists all modules and added a Taxonomy filter:
Filter by the taxonomy "Module Categories"
Module Categories are: set by the current archive page.
I edited the Archive for the taxonomy "Module Categories":
I deleted everything between <wpv-loop> and </wpv-loop>.
I deleted everything between [wpv-no-items-found] and [/wpv-no-items-found]
I inserted the view before [wpv-layout-start].
He code of the archive is now:
[wpv-view name="list-modules-wildlife-3"]
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
<!-- wpv-loop-end -->
</div>
[/wpv-items-found]
[wpv-no-items-found]
[/wpv-no-items-found]
[wpv-layout-end]
And this works.
Not logged-in users will see the Featured image and post title with a link and when they click on the link they get the message that the content is restricted to members only.
So I think this is a workaround.
What do you think?