I am building a grid of posts. When using {{dc:post:classes}} inside a text field all css classes for each post will be displayed. I am now got the idea by showing only posts with the css class “is enrolled” in this grid but I don’t get the looper provider to work. Any hint on how to achieve this kind of query? Thanks!
Hello Daniel,
Thanks for writing in!
How this is enrolled
class related to the post? Is this a category, taxonomy, custom field or an ACF? We must firsl establish the relationship so that we can figure out which looper we are going to use to return only the items that has this class. Please provide us access to your site so that we can check. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site
To know how to create a secure note, please check this out: How The Forum Works
Best Regards.
Thanks @ruenel. I’ve added a secure note to the start post. I heareby send confirmation that you can access and make changes to the site as you like.
This is about trying to build a subpage (/meine-kurse) where I am trying to just loop the courses where the current user is enrolled to by LifterLMS. At the moment the page is showing ALL courses no matter if user is enrolled or not. I have enrolled the “themeco” user to just one course (“Groove Your Ä**”) so if you could help it should show just this one course at the end.
I’ve found out that LifterLMS is adding the css class “is-enrolled” or “not-enrolled” to every post in the category “course” and I thought this would be a useful approach to achieve my goal by just filtering by classes because I’ve found out that {{dc:post:classes}} is outputting the classes but I can’t get it to work to filter by {{dc:post:classes}}.
Tried for hours without success.
Thank you for every hint.
Hello Daniel,
You will have to add a condition in your Post element is-enrolled IN {{dc:post:classes}}
:
Only the items that the current logged-in user is enrolled will be displayed.
Hope this makes sense.
Oh wow, really that easy? Thank you! I didn’t now about conditions at all.
Pagination isn’t working on this page because it’s no archive page. Did I understand it correctly that there’s no way to enable pagination element when looper provider is used on pages outside of archives?
Hi Daniel,
Glad to know that we are able to help you. Regarding the pagination, currently, it works only on a few of the Pre Defined Archive layouts.
Thanks
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.