Course Settings Options – LearnPress
-
Good Day,
The Theme is amazing but I’d like to know how I can make changes to certain options in Course Settings. I have attached an image that has the information underlined in red that I would like to change.
So one option is “Duration” which does not include “Months” & “Years” as options in the drop-down, also the “Level” option to display the difficulty only has 4 levels but I need to edit the this as the identifiers we use is completely different.
Kind Regards Kyle
-
Hi Kyle,
Thank you for contacting us.
Regarding your request to modify the options in the Course Settings, these customizations require code modifications as they are not available directly within the LearnPress settings.
For removing “Months” & “Years” from the “Duration” options, you can explore using the following hook:
apply_filters( 'learn_press_course_duration_support', '...' );
This hook is located in the file: wp-content/plugins/learnpress/inc/lp-core-functions.php.
To modify the “Level” options, you can look into the following hook:
apply_filters('lp/template/function/course/level', '...' );
This hook can be found in the file: wp-content/plugins/learnpress/inc/lp-template-functions.php.
Please note that making changes to these files requires PHP coding knowledge.
Best regards,
Brianvu-tpBrian!! Thank you so so much for getting back to me and offering a potential solution.
It is appreciated a lot.
If I may ask another Q, how will this affect the theme’s functionality when a new update is released?
Have a Great Day and Thank You again!
Kindest Regards
Kyle
Hi Brian,
I’ve been able to make changes to the duration, I can see the changes are active in a test site but my issue is that when I create a preview the “duration” does not update, it still shows 3 hours.
I updated the lp core and lp template functions. Am i missing something?
Kindest Regards
Kyle
Hi Kyle,
Thank you for the update.
To help us understand why the preview isn’t reflecting the updated duration, could you please provide the following information:
- The name of the theme you are currently using.
- A short video or screenshots that clearly demonstrate the issue.
With this information, we’ll be in a better position to provide you with the most accurate and effective guidance.
Best regards,
Brianvu-tpHi Brian, Thanks again,
The theme Im using is LearnPress, this is part of the Ellen Theme Package: https://themeforest.net/item/ellen-lms-education-wordpress-theme/35073008
I’ve installed a local version of WP, installed theme and went through a few of the php files in the inc folder as you suggested. Also please note I have not made an modifications to the “Level” options as Im trying to get the “Duration” sorted first.
Here are the lp-template-functions changes: https://codepen.io/Kyle-Goliath/pen/KwwBPyb?editors=0010
Here are the lp-core-functions changes: https://codepen.io/Kyle-Goliath/pen/RNNBbgV
Thanks for your time Brian and Kind Regards
Kyle
*Below is a clip of the issue
-
This reply was modified 1 month, 3 weeks ago by
sequentialta01.
Hi Kyle,
Thank you for providing the theme information.
Please try adding the following code snippet to the functions.php file of your child theme:
function my_theme_add_month_to_course_duration( $duration_units ) { $duration_units['month'] = esc_html__( 'Month(s)', 'your-theme-textdomain' ); return $duration_units; } add_filter( 'learn_press_course_duration_support', 'my_theme_add_month_to_course_duration' );
Remember to replace ‘your-theme-textdomain’ with the actual text domain of your Ellen child theme if it has one defined.
After adding this code to your child theme’s functions.php file, please check if the “Month(s)” option now appears in the “Duration” dropdown when creating or editing a course and if it’s reflected correctly in the preview.
Best regards,
Brianvu-tpHi Brian
Thanks for getting back to me,
I add the code but there is no change on the course page.
Just to clarify, the option “months” in the “Duration” line was not there initially but the code I updated added “months” to the drop-down menu.
So the changes do not appear on the course page as shown in the video I sent yesterday. I also tried changing some of the other options and they do update successfully when I preview the course page.
Kind Regards
Kyle
Hi Kyle,
Thank you for the clarification.
To further investigate if the issue is related to your current theme’s customization, could you please try the following:
- Temporarily switch your website’s theme to a default WordPress theme like Twenty Twenty-Five.
- Ensure the code snippet we provided earlier is still present in the functions.php file of your (now active) Twenty Twenty-Five theme’s.
After switching the theme and confirming the code snippet is in place, please check if the “Month(s)” option now appears correctly on the course page preview.
- If the “Month(s)” option is now displayed correctly with the Twenty Twenty-Five theme, it strongly suggests that your Ellen theme or its child theme is overriding the default LearnPress. In this case, you would need to contact the Ellen theme developers for the most accurate assistance.
- If the “Month(s)” option still does not appear even with the default Twenty Twenty-Five theme active and the code snippet in place, please let us know, and we will explore other potential reasons for this behavior.
Best regards,
Brianvu-tpHi Brain,
I have changed to the Twenty Twenty-Five theme and the LP functions update as they should. Thanks for all your help, it is really appreciated.
I have contacted the Ellen Theme devs to assist with updating issue.
Hope you have a Great Weekend. Kind Regards
Kyle
Hi Kyle,
We’re very happy to hear that switching to the Twenty Twenty-Five theme confirmed that the LearnPress function modifications are working as expected.
Thank you for your understanding and for contacting the Ellen theme developers for further assistance with their theme’s integration.
If you are satisfied with LearnPress and our support, we would greatly appreciate it if you could leave us a 5-star review. A positive rating is a big motivation for us to continue our hard work, and it’s really important to us.
Thank you very much for your feedback.
Best regards,
Brianvu-tp
- You must be logged in to reply to this topic.