I have a shortcode [ld_course_list]
that works when using the WP content edit page. But when I convert it to a Pro page and use a Classic Raw Element to add the shortcode doesn’t completely work.
I have traced the issue to this function from the shortcode:
https://pastebin.com/QNDZJUjs
From what I can tell is that nothing after line 9 is being returned. The CSS and the JS files are not loaded on the PRO page and the <div id='ld_course_list'>
is not being added before the [ld_course_list]
. But the content from the shortcode is being loaded.
If I add the ID to the Raw Element and load the CSS and JS manually on the PRO page it works fine. When the default content area is used, the CSS and JS are loaded before the closing </body>
tag.
Is there a reason why the code after the return in line 9 would not run on a PRO page, but will on a default WP page?