• Resolved malvikaparmar1692

    (@malvikaparmar1692)


    hello

    i am getting issue for learndash plugin, so i contacted learndash support , and they find the issue and support answer is here:

    When Yoast SEO was active, several LearnDash Focus Mode interface elements were not rendering correctly. This included the Lesson/Materials tabs, assignment upload blocks, and some of the structural HTML wrappers responsible for the layout.

    After profiling the behavior, the issue appears to stem from how Yoast SEO generates its OpenGraph metadata.

    When a LearnDash lesson does not have a manually defined excerpt, Yoast attempts to automatically generate a description for social sharing tags. To do this, it calls the native WordPress function wp_trim_excerpt(). This process forces WordPress to evaluate the full page content in the background before the page is fully rendered.

    Because LearnDash uses its own template handling within Focus Mode, this background processing can interfere with the normal rendering sequence. As a result, some interface components may not load properly, which is why the page appears without certain UI elements.
    To work around this, I added a small PHP filter to your active theme’s functions.php file. This adjustment intercepts that background excerpt generation only for LearnDash post types. By doing so, Yoast evaluates a safe fallback value instead of forcing the entire lesson content to be processed prematurely. This allows the LearnDash Focus Mode templates to render normally when the page loads.

    The change is limited specifically to LearnDash content, so Yoast SEO should continue functioning normally across the rest of your site.

    That said, it would still be helpful to report this behavior to the Yoast SEO team so they can review how their excerpt generation interacts with LearnDash lessons. You are welcome to share the details from this message if it helps with their investigation.


    here is course link: https://anwbb.com/courses/history-philosophy-of-naturopathy/

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @malvikaparmar1692,

    Thanks for bringing the issue to our attention. The described behaviour aligns with how Yoast SEO generates OpenGraph metadata when no manual excerpt is set. I understand a temporary workaround has been provided for you. You could also disable OpenGraph metadata output on LearnDash lesson pages.

    Thread Starter malvikaparmar1692

    (@malvikaparmar1692)

    how can i disable on learndash lesson pages ??

    Plugin Support Maybellyne

    (@maybellyne)

    There is no feature to disable this in the Yoast SEO plugin UI. It requires custom code, and you can try the one below:

    function disable_yoast_open_graph_on_learndash_lessons() {
    if ( function_exists('is_singular') && is_singular('sfwd-lessons') ) {
    // Disable OpenGraph output by Yoast
    add_filter('wpseo_opengraph', '__return_false');
    }
    }
    add_action('wp', 'disable_yoast_open_graph_on_learndash_lessons');

    Add the above code snippet to your child theme’s functions.php file or use a plugin like Code Snippets to safely add it. You may also test on a staging site first. If you’re unfamiliar with using code snippets, we’d like to refer you to the WordPress documentation on how to use a filter.

    Hi all,

    The code didn’t work for me but this seemed to: I added a short default Meta Description for the Lesson and Topic post types in Yoast settings > Content Types > Search Appearance

    • This reply was modified 1 month, 3 weeks ago by samjnz.
Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.