Hi moein,
Thank you for reaching out!
Based on the screenshot you provided, the issue with the course and profile pages not displaying correctly is likely due to a conflict with your another plugin.
To help us narrow down the cause, could you please try the following troubleshooting step?
- Temporarily deactivate all plugins on your site except for LearnPress.
- Check the course and profile pages again to see if the issue is resolved.
If the pages display correctly after deactivating the other plugins, it confirms a conflict. You can then reactivate your plugins one by one to identify which one is causing the issue.
Please let us know the result of this test. If the problem persists even with only LearnPress active, we’ll provide you with another solution.
Best regards,
Brianvu-tp
Thread Starter
moein
(@moeinkd)
Thank you for your answer
I disabled all the plugins but no changes! Probably the problem with the theme incompatibility with the plugin
I added the following functional code . recovery on the side page of the creation period that sees in the image below but the profile page will not be displayed! And that with this code, lession page that displayed no longer displayed
On the profile page only the courses tabs do not display. other tabs are okey.
function code :
add_action('template_redirect', function() {
if (function_exists('learn_press_is_course') && learn_press_is_course()) {
$template_file = '';
if (learn_press_is_profile()) {
$template_file = WP_PLUGIN_DIR . '/learnpress/templates/profile/index.php';
}
elseif (is_singular('lp_course')) {
$template_file = WP_PLUGIN_DIR . '/learnpress/templates/single-course.php';
}
elseif (is_singular('lp_lesson')) {
$template_file = WP_PLUGIN_DIR . '/learnpress/templates/content-lesson.php';
}
if ($template_file && file_exists($template_file)) {
include $template_file;
exit;
}
}
});
profile and course page img:
https://freeimage.host/i/K9tMfhF
my theme :
https://filebin.net/qyxp0lxk9saircrq
-
This reply was modified 8 months, 2 weeks ago by
moein.
-
This reply was modified 8 months, 2 weeks ago by
moein.
Hi moein,
Thank you for your quick response.
Since you’ve already deactivated all other plugins and the issue persists, it’s highly likely that you’re correct—the problem is a compatibility issue with your theme, “Dabir.”
To confirm this theory and to find the correct path forward, please try one more test:
- Temporarily activate a default WordPress theme, such as Twenty Twenty-Five.
- Check your LearnPress course and profile pages to see if they display correctly.
If the pages now work correctly with the default theme, it definitively confirms the incompatibility with the “Dabir” theme. In this case, your best solution is to reach out to the theme’s developer for support, as they will need to update their theme to properly support LearnPress’s template system.
If the problem still persists even with the default theme active, please let us know. This would indicate a different issue, and we will provide you with further troubleshooting steps.
Best regards,
Brianvu-tp
Thread Starter
moein
(@moeinkd)
Hi I already did this test. Your plugin is fully compatibility. The problem is from the template. But unfortunately the developer did not respond and did not any development
Do you have any solution
Hi moein,
Thank you for confirming that the issue is resolved when you use a default WordPress theme. This confirms that the problem lies with the “Dabir” theme’s compatibility.
We have also installed and tested the theme you provided on a PHP 7.4 environment and noticed that it uses outdated WordPress functions that are no longer supported like post_permalink() function. This is likely the root cause of the many errors you’re experiencing, including the LearnPress display issues.
You can see a detailed log of these errors here. Or you can enable WP_DEBUG_LOG on your site to see them as well.
Unfortunately, since the incompatibility is due to the theme’s core code, we cannot provide a simple code snippet to fix it universally. The only definitive solution is for the theme developer to update their theme to align with modern WordPress standards and to ensure compatibility with LearnPress’s templates.
For this reason, we must advise that the most effective and long-term solution is to continue to reach out to the theme developer for a definitive fix. We are unable to provide comprehensive support for a third-party theme’s core code.
Best regards,
Brianvu-tp
Thread Starter
moein
(@moeinkd)
Thank you for the time and goodness you spent
You are right. These problems should be resolved from the template,
Again, thank you for checking and showing the errors
With great respect
Hi moein,
You are very welcome!
We are happy that we could help you identify the root cause of the issue, even if the final solution rests with the theme developer. Thank you for your kind words and for your understanding.
If you are satisfied with LearnPress, we would greatly appreciate it if you could leave us a 5-star review. A nice rating is a big motivation for us to keep up the hard work, and it’s really important to us.
Thank you very much for your feedback.
Best regards,
Brianvu-tp