1. Verify Relationship Data
Ensure Lessons are Linked to Courses:
- Edit a Lesson: Go to the WordPress admin dashboard, and edit a Lesson post.
- Check Relationship Field: Make sure the Course field is populated correctly. The lesson should be linked to a Course.
Test with a Specific Course ID:
- Manually Check Data: Use a plugin like WP phpMyAdmin to view the
wp_postmeta
table. - Look for Meta Key: Check for entries where the meta key matches your relationship field. For example, if your relationship field is
jet_engine_relation_courses_lessons_course_id
, find rows with this key and verify they have correct values.
2. Confirm Meta Query Settings
Check Field Key/Name:
- Identify Meta Key: Go to JetEngine > Relations and confirm the exact meta key used for storing the relationship between Courses and Lessons.
Meta Query Configuration:
- Go to JetEngine > Query Builder and open your custom query.
- Meta Query section:
- Field key/name: Ensure it matches the meta key found earlier.
- Compare: Set to
=
. - Value: Use a dynamic tag for
Post ID
or test with a specific ID. - Type: Set to
NUMERIC
.
3. Test with a Static Query
Set Static Post ID:
- In your Meta Query, manually input a Course ID in the Value field (e.g.,
123
). - Save and Refresh: Apply changes and check if lessons appear for this specific course.
4. Review Listing Grid Settings
Check Query Binding:
- Go to JetEngine > Listings and edit the Listing Grid for Lessons.
- Ensure the grid is bound to the correct Custom Query.
Create a Simple Listing Grid:
- Create a new Listing Grid without complex filters.
- Use a basic configuration to test if lessons are being listed correctly.
5. Debugging
Enable WordPress Debugging: